diff --git a/src/@core/layouts/components/app-navbar/AppNavbarHorizontalLayout.vue b/src/@core/layouts/components/app-navbar/AppNavbarHorizontalLayout.vue deleted file mode 100644 index 86b5b478..00000000 --- a/src/@core/layouts/components/app-navbar/AppNavbarHorizontalLayout.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/@core/layouts/components/app-navbar/AppNavbarHorizontalLayoutBrand.vue b/src/@core/layouts/components/app-navbar/AppNavbarHorizontalLayoutBrand.vue deleted file mode 100644 index e79ef234..00000000 --- a/src/@core/layouts/components/app-navbar/AppNavbarHorizontalLayoutBrand.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - {{ appName }} - - - - - - - - - - diff --git a/src/@core/layouts/components/app-navbar/AppNavbarVerticalLayout.vue b/src/@core/layouts/components/app-navbar/AppNavbarVerticalLayout.vue index 39027f56..63a86bff 100644 --- a/src/@core/layouts/components/app-navbar/AppNavbarVerticalLayout.vue +++ b/src/@core/layouts/components/app-navbar/AppNavbarVerticalLayout.vue @@ -35,10 +35,8 @@ import { BLink, BNavbarNav, } from 'bootstrap-vue' -import Bookmarks from './components/Bookmarks.vue' import SearchBar from './components/SearchBar.vue' import DarkToggler from './components/DarkToggler.vue' -import NotificationDropdown from './components/NotificationDropdown.vue' export default { components: { @@ -46,10 +44,8 @@ export default { // Navbar Components BNavbarNav, - Bookmarks, SearchBar, DarkToggler, - NotificationDropdown, }, props: { toggleVerticalMenuActive: { diff --git a/src/@core/layouts/components/app-navbar/components/Bookmarks.vue b/src/@core/layouts/components/app-navbar/components/Bookmarks.vue deleted file mode 100644 index 5b449e71..00000000 --- a/src/@core/layouts/components/app-navbar/components/Bookmarks.vue +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - {{ suggestion.title }} - - - - - No Results Found. - - - - - - - - - - diff --git a/src/@core/layouts/components/app-navbar/components/CartDropdown.vue b/src/@core/layouts/components/app-navbar/components/CartDropdown.vue deleted file mode 100644 index 64f14634..00000000 --- a/src/@core/layouts/components/app-navbar/components/CartDropdown.vue +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - My Cart - - - {{ $store.state['app-ecommerce'].cartItemsCount }} Items - - - - - - - - - - - - - - - {{ item.name }} - - - By {{ item.brand }} - - - - - - - - ${{ item.price }} - - - - - - - - - Total: - - - ${{ totalAmount }} - - - - Checkout - - - - - Your cart is empty - - - - - - - diff --git a/src/@core/layouts/components/app-navbar/components/NotificationDropdown.vue b/src/@core/layouts/components/app-navbar/components/NotificationDropdown.vue deleted file mode 100644 index 0c02d3d9..00000000 --- a/src/@core/layouts/components/app-navbar/components/NotificationDropdown.vue +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - Notifications - - - 6 New - - - - - - - - - - - - - - - {{ notification.title }} - - - {{ notification.subtitle }} - - - - - - - System Notifications - - - - - - - - - - - - - - - {{ notification.title }} - - - {{ notification.subtitle }} - - - - - - Read all notifications - - - - - - - diff --git a/src/@core/layouts/components/app-navbar/components/UserDropdown.vue b/src/@core/layouts/components/app-navbar/components/UserDropdown.vue deleted file mode 100644 index 709715c6..00000000 --- a/src/@core/layouts/components/app-navbar/components/UserDropdown.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - {{ userData.fullName || userData.username }} - - {{ userData.role }} - - - - - - - - - Profile - - - - Inbox - - - - Task - - - - Chat - - - - - - - Settings - - - - Pricing - - - - FAQ - - - - Logout - - - - diff --git a/src/@core/layouts/components/app-navbar/search-and-bookmark-data.js b/src/@core/layouts/components/app-navbar/search-and-bookmark-data.js deleted file mode 100644 index 1b4f8ee6..00000000 --- a/src/@core/layouts/components/app-navbar/search-and-bookmark-data.js +++ /dev/null @@ -1,295 +0,0 @@ -/* eslint-disable */ -// prettier-ignore -export default { - pages: { - key: 'title', - data: [ - { title: 'Access Control', route: { name: 'access-control' }, icon: 'ShieldIcon', isBookmarked: false }, - { title: 'Account Settings', route: { name: 'pages-account-setting' }, icon: 'SettingsIcon', isBookmarked: false }, - { title: 'Advance Card', route: { name: 'card-advance' }, icon: 'CreditCardIcon', isBookmarked: false }, - { title: 'Alerts', route: { name: 'components-alert' }, icon: 'AlertTriangleIcon', isBookmarked: false }, - { title: 'Analytics Cards', route: { name: 'card-analytic' }, icon: 'CreditCardIcon', isBookmarked: false }, - { title: 'Apex Chart', route: { name: 'charts-apex-chart' }, icon: 'PieChartIcon', isBookmarked: false }, - { title: 'Aspect', route: { name: 'components-aspect' }, icon: 'AirplayIcon', isBookmarked: false }, - { title: 'Auto Suggest', route: { name: 'extensions-auto-suggest' }, icon: 'AlignLeftIcon', isBookmarked: false }, - { title: 'Avatar', route: { name: 'components-avatar' }, icon: 'UserIcon', isBookmarked: false }, - { title: 'Badge', route: { name: 'components-badge' }, icon: 'TagIcon', isBookmarked: false }, - { title: 'Basic Card', route: { name: 'card-basic' }, icon: 'CreditCardIcon', isBookmarked: false }, - { title: 'Blog Detail', route: { name: 'pages-blog-detail', params: { id: 1 } }, icon: 'FileTextIcon', isBookmarked: false }, - { title: 'Blog Edit', route: { name: 'pages-blog-edit', params: { id: 1 } }, icon: 'FileTextIcon', isBookmarked: false }, - { title: 'Blog List', route: { name: 'pages-blog-list' }, icon: 'FileTextIcon', isBookmarked: false }, - { title: 'Breadcrumb', route: { name: 'components-breadcrumb' }, icon: 'HomeIcon', isBookmarked: false }, - { title: 'BS Table', route: { name: 'table-bs-table' }, icon: 'GridIcon', isBookmarked: false }, - { title: 'Button Group', route: { name: 'components-button-group' }, icon: 'BoldIcon', isBookmarked: false }, - { title: 'Button Toolbar', route: { name: 'components-button-toolbar' }, icon: 'BoldIcon', isBookmarked: false }, - { title: 'Button', route: { name: 'components-button' }, icon: 'BoldIcon', isBookmarked: false }, - { title: 'Calendar App', route: { name: 'apps-calendar' }, icon: 'CalendarIcon', isBookmarked: true }, - { title: 'Calendar Component', route: { name: 'components-calendar' }, icon: 'CalendarIcon', isBookmarked: false }, - { title: 'Card Actions', route: { name: 'card-action' }, icon: 'CreditCardIcon', isBookmarked: false }, - { title: 'Carousel', route: { name: 'components-carousel' }, icon: 'CopyIcon', isBookmarked: false }, - { title: 'Chartjs', route: { name: 'charts-chartjs' }, icon: 'PieChartIcon', isBookmarked: false }, - { title: 'Chat', route: { name: 'apps-chat' }, icon: 'MessageSquareIcon', isBookmarked: true }, - { title: 'Checkbox', route: { name: 'forms-element-checkbox' }, icon: 'CheckSquareIcon', isBookmarked: false }, - { title: 'Checkout', route: { name: 'apps-e-commerce-checkout' }, icon: 'DollarSignIcon', isBookmarked: false }, - { title: 'Clipboard', route: { name: 'extensions-clipboard' }, icon: 'ClipboardIcon', isBookmarked: false }, - { title: 'Collapse', route: { name: 'components-collapse' }, icon: 'PlusIcon', isBookmarked: false }, - { title: 'Colors', route: { name: 'ui-colors' }, icon: 'DropletIcon', isBookmarked: false }, - { title: 'Coming Soon', route: { name: 'misc-coming-soon' }, icon: 'ClockIcon', isBookmarked: false }, - { title: 'Context Menu', route: { name: 'extensions-context-menu' }, icon: 'MoreVerticalIcon', isBookmarked: false }, - { title: 'Dashboard Analytics', route: { name: 'dashboard-analytics' }, icon: 'ActivityIcon', isBookmarked: false }, - { title: 'Dashboard ECommerce', route: { name: 'dashboard-ecommerce' }, icon: 'ShoppingCartIcon', isBookmarked: false }, - { title: 'Date Time Picker', route: { name: 'extensions-date-time-picker' }, icon: 'ClockIcon', isBookmarked: false }, - { title: 'Drag & Drop', route: { name: 'extensions-drag-and-drop' }, icon: 'CopyIcon', isBookmarked: false }, - { title: 'Dropdown', route: { name: 'components-dropdown' }, icon: 'MoreHorizontalIcon', isBookmarked: false }, - { title: 'Echart', route: { name: 'charts-echart' }, icon: 'PieChartIcon', isBookmarked: false }, - { title: 'Email', route: { name: 'apps-email' }, icon: 'MailIcon', isBookmarked: true }, - { title: 'Embed', route: { name: 'components-embed' }, icon: 'TvIcon', isBookmarked: false }, - { title: 'Error 404', route: { name: 'error-404' }, icon: 'AlertTriangleIcon', isBookmarked: false }, - { title: 'Error', route: { name: 'misc-error' }, icon: 'AlertTriangleIcon', isBookmarked: false }, - { title: 'FAQ', route: { name: 'pages-faq' }, icon: 'HelpCircleIcon', isBookmarked: false }, - { title: 'Feather', route: { name: 'ui-feather' }, icon: 'FeatherIcon', isBookmarked: false }, - { title: 'File Input', route: { name: 'forms-element-file-input' }, icon: 'FileIcon', isBookmarked: false }, - { title: 'Forgot Password V1', route: { name: 'auth-forgot-password-v1' }, icon: 'KeyIcon', isBookmarked: false }, - { title: 'Forgot Password V2', route: { name: 'auth-forgot-password-v2' }, icon: 'KeyIcon', isBookmarked: false }, - { title: 'Form Datepicker', route: { name: 'forms-element-datepicker' }, icon: 'ClockIcon', isBookmarked: false }, - { title: 'Form Layout', route: { name: 'form-layout' }, icon: 'GridIcon', isBookmarked: false }, - { title: 'Form Rating', route: { name: 'forms-element-rating' }, icon: 'StarIcon', isBookmarked: false }, - { title: 'Form Repeater', route: { name: 'form-repeater' }, icon: 'StarIcon', isBookmarked: false }, - { title: 'Form Tag', route: { name: 'forms-element-tag' }, icon: 'TagIcon', isBookmarked: false }, - { title: 'Form Timepicker', route: { name: 'forms-element-timepicker' }, icon: 'ClockIcon', isBookmarked: false }, - { title: 'Form Validation', route: { name: 'form-validation' }, icon: 'CheckCircleIcon', isBookmarked: false }, - { title: 'Form Wizard', route: { name: 'form-wizard' }, icon: 'GitCommitIcon', isBookmarked: false }, - { title: 'Good Table', route: { name: 'table-good-table' }, icon: 'GridIcon', isBookmarked: false }, - { title: 'I18n', route: { name: 'extensions-i18n' }, icon: 'GlobeIcon', isBookmarked: false }, - { title: 'Image', route: { name: 'components-image' }, icon: 'ImageIcon', isBookmarked: false }, - { title: 'Input Group', route: { name: 'forms-element-input-group' }, icon: 'TypeIcon', isBookmarked: false }, - { title: 'Input Mask', route: { name: 'forms-element-input-mask' }, icon: 'TypeIcon', isBookmarked: false }, - { title: 'Input', route: { name: 'forms-element-input' }, icon: 'TypeIcon', isBookmarked: false }, - { title: 'Invoice Add', route: { name: 'apps-invoice-add' }, icon: 'FileTextIcon', isBookmarked: false }, - { title: 'Invoice Edit', route: { name: 'apps-invoice-edit', params: { id: 4987 } }, icon: 'FileTextIcon', isBookmarked: false }, - { title: 'Invoice List', route: { name: 'apps-invoice-list' }, icon: 'FileTextIcon', isBookmarked: false }, - { title: 'Invoice Preview', route: { name: 'apps-invoice-preview', params: { id: 4987 } }, icon: 'FileTextIcon', isBookmarked: false }, - { title: 'Knowledge Base Category', route: { name: 'pages-knowledge-base-category' }, icon: 'InfoIcon', isBookmarked: false, }, - { title: 'Knowledge Base Question', route: { name: 'pages-knowledge-base-question' }, icon: 'InfoIcon', isBookmarked: false, }, - { title: 'Knowledge Base', route: { name: 'pages-knowledge-base' }, icon: 'InfoIcon', isBookmarked: false }, - { title: 'Leaflet', route: { name: 'maps-leaflet' }, icon: 'MapPinIcon', isBookmarked: false }, - { title: 'List Group', route: { name: 'components-list-group' }, icon: 'ListIcon', isBookmarked: false }, - { title: 'Login V1', route: { name: 'auth-login-v1' }, icon: 'LogInIcon', isBookmarked: false }, - { title: 'Login V2', route: { name: 'auth-login-v2' }, icon: 'LogInIcon', isBookmarked: false }, - { title: 'Media Objects', route: { name: 'components-media' }, icon: 'ImageIcon', isBookmarked: false }, - { title: 'Modal', route: { name: 'components-modal' }, icon: 'CopyIcon', isBookmarked: false }, - { title: 'Nav', route: { name: 'components-nav' }, icon: 'CreditCardIcon', isBookmarked: false }, - { title: 'Not Authorized', route: { name: 'misc-not-authorized' }, icon: 'XOctagonIcon', isBookmarked: false }, - { title: 'Overlay', route: { name: 'components-overlay' }, icon: 'CopyIcon', isBookmarked: false }, - { title: 'Pagination Nav', route: { name: 'components-pagination-nav' }, icon: 'HashIcon', isBookmarked: false }, - { title: 'Pagination', route: { name: 'components-pagination' }, icon: 'HashIcon', isBookmarked: false }, - { title: 'Pill Badge', route: { name: 'components-pill-badge' }, icon: 'TagIcon', isBookmarked: false }, - { title: 'Pill', route: { name: 'components-pill' }, icon: 'TagIcon', isBookmarked: false }, - { title: 'Popover', route: { name: 'components-popover' }, icon: 'TagIcon', isBookmarked: false }, - { title: 'Pricing', route: { name: 'pages-pricing' }, icon: 'DollarSignIcon', isBookmarked: false }, - { title: 'Product Details', route: { name: 'apps-e-commerce-product-details', params: { slug: 'apple-watch-series-5-27' } }, icon: 'BoxIcon', isBookmarked: false, }, - { title: 'Profile', route: { name: 'pages-profile' }, icon: 'UserIcon', isBookmarked: false }, - { title: 'Progress', route: { name: 'components-progress' }, icon: 'ChevronsRightIcon', isBookmarked: false }, - { title: 'Quill Editor', route: { name: 'extensions-quill-editor' }, icon: 'TypeIcon', isBookmarked: false }, - { title: 'Radio', route: { name: 'forms-element-radio' }, icon: 'DiscIcon', isBookmarked: false }, - { title: 'Register V1', route: { name: 'auth-register-v1' }, icon: 'UserPlusIcon', isBookmarked: false }, - { title: 'Register V2', route: { name: 'auth-register-v2' }, icon: 'UserPlusIcon', isBookmarked: false }, - { title: 'Reset Password V1', route: { name: 'auth-reset-password-v1' }, icon: 'KeyIcon', isBookmarked: false }, - { title: 'Reset Password V2', route: { name: 'auth-reset-password-v2' }, icon: 'KeyIcon', isBookmarked: false }, - { title: 'Select', route: { name: 'forms-element-select' }, icon: 'AlignCenterIcon', isBookmarked: false }, - { title: 'Shop', route: { name: 'apps-e-commerce-shop' }, icon: 'ArchiveIcon', isBookmarked: false }, - { title: 'Sidebar', route: { name: 'components-sidebar' }, icon: 'SidebarIcon', isBookmarked: false }, - { title: 'Slider', route: { name: 'extensions-slider' }, icon: 'GitCommitIcon', isBookmarked: false }, - { title: 'Spinbutton', route: { name: 'forms-element-spinbutton' }, icon: 'TypeIcon', isBookmarked: false }, - { title: 'Spinner', route: { name: 'components-spinner' }, icon: 'LoaderIcon', isBookmarked: false }, - { title: 'Statistics Cards', route: { name: 'card-statistic' }, icon: 'CreditCardIcon', isBookmarked: false }, - { title: 'Sweet Alert', route: { name: 'extensions-sweet-alert' }, icon: 'BellIcon', isBookmarked: false }, - { title: 'Swiper', route: { name: 'extensions-swiper' }, icon: 'ImageIcon', isBookmarked: false }, - { title: 'Switch', route: { name: 'forms-element-switch' }, icon: 'ToggleRightIcon', isBookmarked: false }, - { title: 'Tab', route: { name: 'components-tab' }, icon: 'CreditCardIcon', isBookmarked: false }, - { title: 'Textarea', route: { name: 'forms-element-textarea' }, icon: 'TypeIcon', isBookmarked: false }, - { title: 'Time', route: { name: 'components-time' }, icon: 'ClockIcon', isBookmarked: false }, - { title: 'Timeline', route: { name: 'components-timeline' }, icon: 'GitCommitIcon', isBookmarked: false }, - { title: 'Toastification', route: { name: 'extensions-toastification' }, icon: 'BellIcon', isBookmarked: false }, - { title: 'Toasts', route: { name: 'components-toasts' }, icon: 'BellIcon', isBookmarked: false }, - { title: 'Todo', route: { name: 'apps-todo' }, icon: 'CheckSquareIcon', isBookmarked: true }, - { title: 'Tooltip', route: { name: 'components-tooltip' }, icon: 'CopyIcon', isBookmarked: false }, - { title: 'Tour', route: { name: 'extensions-tour' }, icon: 'GlobeIcon', isBookmarked: false }, - // { title: 'Tree', route: { name: 'extensions-tree' }, icon: 'GitCommitIcon', isBookmarked: false }, - { title: 'Typography', route: { name: 'ui-typography' }, icon: 'TypeIcon', isBookmarked: false }, - { title: 'Under Maintenance', route: { name: 'misc-under-maintenance' }, icon: 'MonitorIcon', isBookmarked: false }, - { title: 'Users Edit', route: { name: 'apps-users-edit', params: { id: 21 } }, icon: 'UserIcon', isBookmarked: false }, - { title: 'Users List', route: { name: 'apps-users-list' }, icon: 'UserIcon', isBookmarked: false }, - { title: 'Users View', route: { name: 'apps-users-view', params: { id: 21 } }, icon: 'UserIcon', isBookmarked: false }, - { title: 'Vue Select', route: { name: 'extensions-vue-select' }, icon: 'AlignCenterIcon', isBookmarked: false }, - { title: 'Wishlist', route: { name: 'apps-e-commerce-wishlist' }, icon: 'HeartIcon', isBookmarked: false }, - ], - }, - files: { - key: 'file_name', - data: [ - { - file_name: "Joe's CV", - from: 'Stacy Watson', - icon: require('@/assets/images/icons/doc.png'), - size: '1.7 mb', - }, - { - file_name: 'Passport Image', - from: 'Ben Sinitiere', - icon: require('@/assets/images/icons/jpg.png'), - size: ' 52 kb', - }, - { - file_name: 'Questions', - from: 'Charleen Patti', - icon: require('@/assets/images/icons/doc.png'), - size: '1.5 gb', - }, - { - file_name: 'Parenting Guide', - from: 'Doyle Blatteau', - icon: require('@/assets/images/icons/doc.png'), - size: '2.3 mb', - }, - { - file_name: 'Class Notes', - from: 'Gwen Greenlow', - icon: require('@/assets/images/icons/doc.png'), - size: ' 30 kb', - }, - { - file_name: 'Class Attendance', - from: 'Tom Alred', - icon: require('@/assets/images/icons/xls.png'), - size: '52 mb', - }, - { - file_name: 'Company Salary', - from: 'Nellie Dezan', - icon: require('@/assets/images/icons/xls.png'), - size: '29 mb', - }, - { - file_name: 'Company Logo', - from: 'Steve Sheldon', - icon: require('@/assets/images/icons/jpg.png'), - size: '1.3 mb', - }, - { - file_name: 'Crime Rates', - from: 'Sherlock Holmes', - icon: require('@/assets/images/icons/xls.png'), - size: '37 kb', - }, - { - file_name: 'Ulysses', - from: 'Theresia Wrenne', - icon: require('@/assets/images/icons/pdf.png'), - size: '7.2 mb', - }, - { - file_name: 'War and Peace', - from: 'Goldie Highnote', - icon: require('@/assets/images/icons/pdf.png'), - size: '10.5 mb', - }, - { - file_name: 'Vedas', - from: 'Ajay Patel', - icon: require('@/assets/images/icons/pdf.png'), - size: '8.3 mb', - }, - { - file_name: 'The Trial', - from: 'Sirena Linkert', - icon: require('@/assets/images/icons/pdf.png'), - size: '1.5 mb', - }, - ], - }, - contacts: { - key: 'name', - data: [ - { - img: require('@/assets/images/portrait/small/avatar-s-4.jpg'), - name: 'Rena Brant', - email: 'nephrod@preany.co.uk', - time: '21/05/2019', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-2.jpg'), - name: 'Mariano Packard', - email: 'seek@sparaxis.org', - time: '14/01/2018', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-24.jpg'), - name: 'Risa Montufar', - email: 'vagary@unblist.org', - time: '10/08/2019', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-15.jpg'), - name: 'Maragaret Cimo', - email: 'designed@insanely.net', - time: '01/12/2019', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-7.jpg'), - name: 'Jona Prattis', - email: 'unwieldable@unblist.org', - time: '21/05/2019', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-5.jpg'), - name: 'Edmond Chicon', - email: 'museist@anaphyte.co.uk', - time: '15/11/2019', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-25.jpg'), - name: 'Abbey Darden', - email: 'astema@defectively.co.uk', - time: '07/05/2019', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-10.jpg'), - name: 'Seema Moallankamp', - email: 'fernando@storkish.co.uk', - time: '13/08/2017', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-2.jpg'), - name: 'Charleen Warmington', - email: 'furphy@cannibal.net', - time: '11/08/1891', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-25.jpg'), - name: 'Geri Linch', - email: 'insignia@markab.org', - time: '18/01/2015', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-23.jpg'), - name: 'Shellie Muster', - email: 'maxillary@equalize.co.uk', - time: '26/07/2019', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-20.jpg'), - name: 'Jesenia Vanbramer', - email: 'hypotony@phonetist.net', - time: '12/09/2017', - }, - { - img: require('@/assets/images/portrait/small/avatar-s-23.jpg'), - name: 'Mardell Channey', - email: 'peseta@myrica.com', - time: '11/11/2019', - }, - ], - }, -} -/* eslint-enable */ diff --git a/src/@core/layouts/layout-horizontal/LayoutHorizontal.vue b/src/@core/layouts/layout-horizontal/LayoutHorizontal.vue deleted file mode 100644 index 21b2d852..00000000 --- a/src/@core/layouts/layout-horizontal/LayoutHorizontal.vue +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/HorizontalNavMenu.vue b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/HorizontalNavMenu.vue deleted file mode 100644 index 7b96c47d..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/HorizontalNavMenu.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/HorizontalNavMenuGroup.vue b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/HorizontalNavMenuGroup.vue deleted file mode 100644 index d0aafb8b..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/HorizontalNavMenuGroup.vue +++ /dev/null @@ -1,96 +0,0 @@ - - updateGroupOpen(true)" - @mouseleave="() => updateGroupOpen(false)" - > - updateGroupOpen(!isOpen)" - > - - {{ t(item.title) }} - - - - - - - - - - diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/mixinHorizontalNavMenuGroup.js b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/mixinHorizontalNavMenuGroup.js deleted file mode 100644 index 6f9a8206..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/mixinHorizontalNavMenuGroup.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - watch: { - $route: { - immediate: true, - handler() { - this.updateIsActive() - }, - }, - }, -} diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/useHorizontalNavMenuGroup.js b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/useHorizontalNavMenuGroup.js deleted file mode 100644 index 3b193bb4..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-group/useHorizontalNavMenuGroup.js +++ /dev/null @@ -1,61 +0,0 @@ -// eslint-disable-next-line object-curly-newline -import { ref, nextTick } from '@vue/composition-api' -// import store from '@/store' -import { isNavGroupActive } from '@core/layouts/utils' - -export default function useHorizontalNavMenuGroup(item) { - // ------------------------------------------------ - // childDropdown - // ------------------------------------------------ - const refChildDropdown = ref(null) - const openChildDropdownOnLeft = ref(false) - - // ------------------------------------------------ - // isActive - // ------------------------------------------------ - const isOpen = ref(false) - - const updateGroupOpen = val => { - isOpen.value = val - if (val) { - nextTick(() => { - const childDropdownWidth = refChildDropdown.value.offsetWidth - const windowContentWidth = window.innerWidth - 16 - const { left: childDropdownLeft } = refChildDropdown.value.getBoundingClientRect() - const shallDropLeft = childDropdownLeft + childDropdownWidth - windowContentWidth - openChildDropdownOnLeft.value = shallDropLeft > 0 - - // Add scroll to child dd if don't have much space - - const refChildDropdownTop = refChildDropdown.value.getBoundingClientRect().top - const refChildDropdownHeight = refChildDropdown.value.getBoundingClientRect().height - if (window.innerHeight - refChildDropdownTop - refChildDropdownHeight - 28 < 1) { - const maxHeight = window.innerHeight - refChildDropdownTop - 70 - refChildDropdown.value.style.maxHeight = `${maxHeight}px` - refChildDropdown.value.style.overflowY = 'auto' - refChildDropdown.value.style.overflowX = 'hidden' - } - }) - } else { - openChildDropdownOnLeft.value = false - } - } - - // ------------------------------------------------ - // isActive - // ------------------------------------------------ - const isActive = ref(false) - - const updateIsActive = () => { - isActive.value = isNavGroupActive(item.children) - } - - return { - isOpen, - isActive, - updateGroupOpen, - updateIsActive, - refChildDropdown, - openChildDropdownOnLeft, - } -} diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/HorizontalNavMenuHeaderGroup.vue b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/HorizontalNavMenuHeaderGroup.vue deleted file mode 100644 index 7f82f276..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/HorizontalNavMenuHeaderGroup.vue +++ /dev/null @@ -1,80 +0,0 @@ - - updateGroupOpen(true)" - @mouseleave="() => updateGroupOpen(false)" - > - - - {{ t(item.header) }} - - - - - - - - diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/mixinHorizontalNavMenuHeaderGroup.js b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/mixinHorizontalNavMenuHeaderGroup.js deleted file mode 100644 index 6f9a8206..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/mixinHorizontalNavMenuHeaderGroup.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - watch: { - $route: { - immediate: true, - handler() { - this.updateIsActive() - }, - }, - }, -} diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/useHorizontalNavMenuHeaderGroup.js b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/useHorizontalNavMenuHeaderGroup.js deleted file mode 100644 index d00d7d6f..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-group/useHorizontalNavMenuHeaderGroup.js +++ /dev/null @@ -1,30 +0,0 @@ -import { ref } from '@vue/composition-api' -import { isNavGroupActive } from '@core/layouts/utils' - -export default function useHorizontalNavMenuHeaderGroup(item) { - // ------------------------------------------------ - // isOpen - // ------------------------------------------------ - const isOpen = ref(false) - - const updateGroupOpen = val => { - // eslint-disable-next-line no-use-before-define - isOpen.value = val - } - - // ------------------------------------------------ - // isActive - // ------------------------------------------------ - const isActive = ref(false) - - const updateIsActive = () => { - isActive.value = isNavGroupActive(item.children) - } - - return { - isOpen, - isActive, - updateGroupOpen, - updateIsActive, - } -} diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/HorizontalNavMenuHeaderLink.vue b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/HorizontalNavMenuHeaderLink.vue deleted file mode 100644 index 2e7ad731..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/HorizontalNavMenuHeaderLink.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - {{ t(item.title) }} - - - - - diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/mixinHorizontalNavMenuHeaderLink.js b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/mixinHorizontalNavMenuHeaderLink.js deleted file mode 100644 index 6f9a8206..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/mixinHorizontalNavMenuHeaderLink.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - watch: { - $route: { - immediate: true, - handler() { - this.updateIsActive() - }, - }, - }, -} diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/useHorizontalNavMenuHeaderLink.js b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/useHorizontalNavMenuHeaderLink.js deleted file mode 100644 index d5ebfc2a..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-header-link/useHorizontalNavMenuHeaderLink.js +++ /dev/null @@ -1,18 +0,0 @@ -import { ref } from '@vue/composition-api' -import { isNavLinkActive } from '@core/layouts/utils' - -export default function useHorizontalNavMenuHeaderGroup(item) { - // ------------------------------------------------ - // isActive - // ------------------------------------------------ - const isActive = ref(false) - - const updateIsActive = () => { - isActive.value = isNavLinkActive(item) - } - - return { - isActive, - updateIsActive, - } -} diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-items/HorizontalNavMenuItems.vue b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-items/HorizontalNavMenuItems.vue deleted file mode 100644 index 08a10d21..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-items/HorizontalNavMenuItems.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/HorizontalNavMenuLink.vue b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/HorizontalNavMenuLink.vue deleted file mode 100644 index 0ce28be7..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/HorizontalNavMenuLink.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {{ t(item.title) }} - - - - - diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/mixinHorizontalNavMenuLink.js b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/mixinHorizontalNavMenuLink.js deleted file mode 100644 index 6f9a8206..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/mixinHorizontalNavMenuLink.js +++ /dev/null @@ -1,10 +0,0 @@ -export default { - watch: { - $route: { - immediate: true, - handler() { - this.updateIsActive() - }, - }, - }, -} diff --git a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/useHorizontalNavMenuLink.js b/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/useHorizontalNavMenuLink.js deleted file mode 100644 index e7b3489e..00000000 --- a/src/@core/layouts/layout-horizontal/components/horizontal-nav-menu/components/horizontal-nav-menu-link/useHorizontalNavMenuLink.js +++ /dev/null @@ -1,18 +0,0 @@ -import { ref } from '@vue/composition-api' -import { isNavLinkActive, navLinkProps } from '@core/layouts/utils' - -export default function useHorizontalNavMenuLink(item) { - const isActive = ref(false) - - const linkProps = navLinkProps(item) - - const updateIsActive = () => { - isActive.value = isNavLinkActive(item) - } - - return { - isActive, - linkProps, - updateIsActive, - } -} diff --git a/src/@core/layouts/layout-horizontal/mixinLayoutHorizontal.js b/src/@core/layouts/layout-horizontal/mixinLayoutHorizontal.js deleted file mode 100644 index 50265ed5..00000000 --- a/src/@core/layouts/layout-horizontal/mixinLayoutHorizontal.js +++ /dev/null @@ -1,11 +0,0 @@ -import { $themeBreakpoints } from '@themeConfig' - -export default { - watch: { - $route() { - if (this.$store.state.app.windowWidth < $themeBreakpoints.xl) { - this.isVerticalMenuActive = false - } - }, - }, -} diff --git a/src/@core/layouts/layout-horizontal/useLayoutHorizontal.js b/src/@core/layouts/layout-horizontal/useLayoutHorizontal.js deleted file mode 100644 index 4c4837f0..00000000 --- a/src/@core/layouts/layout-horizontal/useLayoutHorizontal.js +++ /dev/null @@ -1,57 +0,0 @@ -import { computed } from '@vue/composition-api' -import store from '@/store' - -export default function useLayoutHorizontal(navbarMenuType, footerType, isVerticalMenuActive) { - const currentBreakpoint = computed(() => store.getters['app/currentBreakPoint']) - - const layoutClasses = computed(() => { - const classes = [] - - if (currentBreakpoint.value === 'xl') { - classes.push('horizontal-menu') - } else { - classes.push('vertical-overlay-menu') - // classes.push('vertical-layout') - classes.push(isVerticalMenuActive.value ? 'menu-open' : 'menu-hide') - } - - // Navbar - classes.push(`navbar-${navbarMenuType.value}`) - - // Footer - if (footerType.value === 'sticky') classes.push('footer-fixed') - if (footerType.value === 'static') classes.push('footer-static') - if (footerType.value === 'hidden') classes.push('footer-hidden') - - return classes - }) - - // const resizeHandler = () => { - // isVerticalMenuActive.value = window.innerWidth >= 1200 - - // if (window.innerWidth >= 1200) currentBreakpoint.value = 'xl' - // else if (window.innerWidth >= 992) currentBreakpoint.value = 'lg' - // else if (window.innerWidth >= 768) currentBreakpoint.value = 'md' - // else if (window.innerWidth >= 576) currentBreakpoint.value = 'sm' - // else currentBreakpoint.value = 'xs' - // } - - const navbarMenuTypeClass = computed(() => { - if (navbarMenuType.value === 'sticky') return 'fixed-top' - if (navbarMenuType.value === 'static') return '' - if (navbarMenuType.value === 'hidden') return 'd-none' - return 'floating-nav' - }) - - const footerTypeClass = computed(() => { - if (footerType.value === 'static') return 'footer-static' - if (footerType.value === 'hidden') return 'd-none' - return '' - }) - - return { - layoutClasses, - navbarMenuTypeClass, - footerTypeClass, - } -} diff --git a/src/App.vue b/src/App.vue index 3b67e952..15e5a6fb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -22,13 +22,11 @@ import { useWindowSize, useCssVar } from '@vueuse/core' import store from '@/store' const LayoutVertical = () => import('@/layouts/vertical/LayoutVertical.vue') -const LayoutHorizontal = () => import('@/layouts/horizontal/LayoutHorizontal.vue') const LayoutFull = () => import('@/layouts/full/LayoutFull.vue') export default { components: { // Layouts - LayoutHorizontal, LayoutVertical, LayoutFull, }, @@ -54,7 +52,7 @@ export default { } // Set Theme Breakpoints - const breakpoints = ['xs', 'sm', 'md', 'lg', 'xl'] + const breakpoints = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'] // eslint-disable-next-line no-plusplus for (let i = 0, len = breakpoints.length; i < len; i++) { diff --git a/src/assets/images/avatars/1-small.png b/src/assets/images/avatars/1-small.png deleted file mode 100644 index 406d0bab..00000000 Binary files a/src/assets/images/avatars/1-small.png and /dev/null differ diff --git a/src/assets/images/avatars/1.png b/src/assets/images/avatars/1.png deleted file mode 100644 index eeb2fbb0..00000000 Binary files a/src/assets/images/avatars/1.png and /dev/null differ diff --git a/src/assets/images/avatars/10-small.png b/src/assets/images/avatars/10-small.png deleted file mode 100644 index 099a20df..00000000 Binary files a/src/assets/images/avatars/10-small.png and /dev/null differ diff --git a/src/assets/images/avatars/10.png b/src/assets/images/avatars/10.png deleted file mode 100644 index ff3d20ad..00000000 Binary files a/src/assets/images/avatars/10.png and /dev/null differ diff --git a/src/assets/images/avatars/11-small.png b/src/assets/images/avatars/11-small.png deleted file mode 100644 index cc1b38e7..00000000 Binary files a/src/assets/images/avatars/11-small.png and /dev/null differ diff --git a/src/assets/images/avatars/11.png b/src/assets/images/avatars/11.png deleted file mode 100644 index 02fce4da..00000000 Binary files a/src/assets/images/avatars/11.png and /dev/null differ diff --git a/src/assets/images/avatars/12-small.png b/src/assets/images/avatars/12-small.png deleted file mode 100644 index 4728bfad..00000000 Binary files a/src/assets/images/avatars/12-small.png and /dev/null differ diff --git a/src/assets/images/avatars/12.png b/src/assets/images/avatars/12.png deleted file mode 100644 index 50e79add..00000000 Binary files a/src/assets/images/avatars/12.png and /dev/null differ diff --git a/src/assets/images/avatars/13-small.png b/src/assets/images/avatars/13-small.png deleted file mode 100644 index 0eddb966..00000000 Binary files a/src/assets/images/avatars/13-small.png and /dev/null differ diff --git a/src/assets/images/avatars/13.png b/src/assets/images/avatars/13.png deleted file mode 100644 index 07108ce6..00000000 Binary files a/src/assets/images/avatars/13.png and /dev/null differ diff --git a/src/assets/images/avatars/2-small.png b/src/assets/images/avatars/2-small.png deleted file mode 100644 index 523ee62a..00000000 Binary files a/src/assets/images/avatars/2-small.png and /dev/null differ diff --git a/src/assets/images/avatars/2.png b/src/assets/images/avatars/2.png deleted file mode 100644 index 22945afd..00000000 Binary files a/src/assets/images/avatars/2.png and /dev/null differ diff --git a/src/assets/images/avatars/3-small.png b/src/assets/images/avatars/3-small.png deleted file mode 100644 index d926412c..00000000 Binary files a/src/assets/images/avatars/3-small.png and /dev/null differ diff --git a/src/assets/images/avatars/3.png b/src/assets/images/avatars/3.png deleted file mode 100644 index 0382f7d4..00000000 Binary files a/src/assets/images/avatars/3.png and /dev/null differ diff --git a/src/assets/images/avatars/4-small.png b/src/assets/images/avatars/4-small.png deleted file mode 100644 index 11248ccc..00000000 Binary files a/src/assets/images/avatars/4-small.png and /dev/null differ diff --git a/src/assets/images/avatars/4.png b/src/assets/images/avatars/4.png deleted file mode 100644 index 17c57d21..00000000 Binary files a/src/assets/images/avatars/4.png and /dev/null differ diff --git a/src/assets/images/avatars/5-small.png b/src/assets/images/avatars/5-small.png deleted file mode 100644 index aba8b4ac..00000000 Binary files a/src/assets/images/avatars/5-small.png and /dev/null differ diff --git a/src/assets/images/avatars/5.png b/src/assets/images/avatars/5.png deleted file mode 100644 index 38505ed9..00000000 Binary files a/src/assets/images/avatars/5.png and /dev/null differ diff --git a/src/assets/images/avatars/6-small.png b/src/assets/images/avatars/6-small.png deleted file mode 100644 index 2f5fe510..00000000 Binary files a/src/assets/images/avatars/6-small.png and /dev/null differ diff --git a/src/assets/images/avatars/6.png b/src/assets/images/avatars/6.png deleted file mode 100644 index 6d91822b..00000000 Binary files a/src/assets/images/avatars/6.png and /dev/null differ diff --git a/src/assets/images/avatars/7-small.png b/src/assets/images/avatars/7-small.png deleted file mode 100644 index 9ae7593e..00000000 Binary files a/src/assets/images/avatars/7-small.png and /dev/null differ diff --git a/src/assets/images/avatars/7.png b/src/assets/images/avatars/7.png deleted file mode 100644 index 8874d68e..00000000 Binary files a/src/assets/images/avatars/7.png and /dev/null differ diff --git a/src/assets/images/avatars/8-small.png b/src/assets/images/avatars/8-small.png deleted file mode 100644 index e061c7ae..00000000 Binary files a/src/assets/images/avatars/8-small.png and /dev/null differ diff --git a/src/assets/images/avatars/8.png b/src/assets/images/avatars/8.png deleted file mode 100644 index e2648517..00000000 Binary files a/src/assets/images/avatars/8.png and /dev/null differ diff --git a/src/assets/images/avatars/9-small.png b/src/assets/images/avatars/9-small.png deleted file mode 100644 index d23f1cb3..00000000 Binary files a/src/assets/images/avatars/9-small.png and /dev/null differ diff --git a/src/assets/images/avatars/9.png b/src/assets/images/avatars/9.png deleted file mode 100644 index 9c63a9ab..00000000 Binary files a/src/assets/images/avatars/9.png and /dev/null differ diff --git a/src/assets/images/logo/favicon.ico b/src/assets/images/logo/favicon.ico deleted file mode 100644 index 34623229..00000000 Binary files a/src/assets/images/logo/favicon.ico and /dev/null differ diff --git a/src/assets/images/logo/logo.png b/src/assets/images/logo/logo.png deleted file mode 100644 index f89b7768..00000000 Binary files a/src/assets/images/logo/logo.png and /dev/null differ diff --git a/src/assets/images/logo/logo.svg b/src/assets/images/logo/logo.svg deleted file mode 100644 index 296491c5..00000000 --- a/src/assets/images/logo/logo.svg +++ /dev/null @@ -1,170 +0,0 @@ - - - - diff --git a/src/assets/images/logo/vuexy-logo.png b/src/assets/images/logo/vuexy-logo.png deleted file mode 100644 index d012fb48..00000000 Binary files a/src/assets/images/logo/vuexy-logo.png and /dev/null differ diff --git a/src/assets/images/pages/login/facebook.svg b/src/assets/images/pages/login/facebook.svg deleted file mode 100644 index 6227a2e1..00000000 --- a/src/assets/images/pages/login/facebook.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/images/pages/login/github.svg b/src/assets/images/pages/login/github.svg deleted file mode 100644 index 13678df6..00000000 --- a/src/assets/images/pages/login/github.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/images/pages/login/google.svg b/src/assets/images/pages/login/google.svg deleted file mode 100644 index 2218d963..00000000 --- a/src/assets/images/pages/login/google.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/images/pages/login/twitter.svg b/src/assets/images/pages/login/twitter.svg deleted file mode 100644 index 9ac9e0b9..00000000 --- a/src/assets/images/pages/login/twitter.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/images/portrait/small/avatar-s-1.jpg b/src/assets/images/portrait/small/avatar-s-1.jpg deleted file mode 100644 index a805eecb..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-1.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-10.jpg b/src/assets/images/portrait/small/avatar-s-10.jpg deleted file mode 100644 index a530830a..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-10.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-11.jpg b/src/assets/images/portrait/small/avatar-s-11.jpg deleted file mode 100644 index 87281eec..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-11.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-12.jpg b/src/assets/images/portrait/small/avatar-s-12.jpg deleted file mode 100644 index 7fe71859..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-12.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-13.jpg b/src/assets/images/portrait/small/avatar-s-13.jpg deleted file mode 100644 index a1ea7a61..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-13.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-14.jpg b/src/assets/images/portrait/small/avatar-s-14.jpg deleted file mode 100644 index fdb53381..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-14.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-15.jpg b/src/assets/images/portrait/small/avatar-s-15.jpg deleted file mode 100644 index 28277842..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-15.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-16.jpg b/src/assets/images/portrait/small/avatar-s-16.jpg deleted file mode 100644 index 5e0fdff3..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-16.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-17.jpg b/src/assets/images/portrait/small/avatar-s-17.jpg deleted file mode 100644 index c0fb00ec..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-17.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-18.jpg b/src/assets/images/portrait/small/avatar-s-18.jpg deleted file mode 100644 index 662b82fe..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-18.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-19.jpg b/src/assets/images/portrait/small/avatar-s-19.jpg deleted file mode 100644 index 066d8afb..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-19.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-2.jpg b/src/assets/images/portrait/small/avatar-s-2.jpg deleted file mode 100644 index f865a798..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-2.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-20.jpg b/src/assets/images/portrait/small/avatar-s-20.jpg deleted file mode 100644 index aef73817..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-20.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-21.jpg b/src/assets/images/portrait/small/avatar-s-21.jpg deleted file mode 100644 index a805eecb..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-21.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-22.jpg b/src/assets/images/portrait/small/avatar-s-22.jpg deleted file mode 100644 index f865a798..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-22.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-23.jpg b/src/assets/images/portrait/small/avatar-s-23.jpg deleted file mode 100644 index 8b240d36..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-23.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-24.jpg b/src/assets/images/portrait/small/avatar-s-24.jpg deleted file mode 100644 index 6a1882b1..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-24.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-25.jpg b/src/assets/images/portrait/small/avatar-s-25.jpg deleted file mode 100644 index 35f3bfd9..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-25.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-26.jpg b/src/assets/images/portrait/small/avatar-s-26.jpg deleted file mode 100644 index a05d68cb..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-26.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-3.jpg b/src/assets/images/portrait/small/avatar-s-3.jpg deleted file mode 100644 index 8b240d36..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-3.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-4.jpg b/src/assets/images/portrait/small/avatar-s-4.jpg deleted file mode 100644 index 6a1882b1..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-4.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-5.jpg b/src/assets/images/portrait/small/avatar-s-5.jpg deleted file mode 100644 index 35f3bfd9..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-5.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-6.jpg b/src/assets/images/portrait/small/avatar-s-6.jpg deleted file mode 100644 index a05d68cb..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-6.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-7.jpg b/src/assets/images/portrait/small/avatar-s-7.jpg deleted file mode 100644 index f6d6793c..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-7.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-8.jpg b/src/assets/images/portrait/small/avatar-s-8.jpg deleted file mode 100644 index 6cee846a..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-8.jpg and /dev/null differ diff --git a/src/assets/images/portrait/small/avatar-s-9.jpg b/src/assets/images/portrait/small/avatar-s-9.jpg deleted file mode 100644 index 042c2db7..00000000 Binary files a/src/assets/images/portrait/small/avatar-s-9.jpg and /dev/null differ diff --git a/src/auth/jwt/useJwt.js b/src/auth/jwt/useJwt.js deleted file mode 100644 index 8307a1ab..00000000 --- a/src/auth/jwt/useJwt.js +++ /dev/null @@ -1,5 +0,0 @@ -import useJwt from '@core/auth/jwt/useJwt' -import axios from '@axios' - -const { jwt } = useJwt(axios, {}) -export default jwt diff --git a/src/auth/utils.js b/src/auth/utils.js deleted file mode 100644 index e171aaed..00000000 --- a/src/auth/utils.js +++ /dev/null @@ -1,27 +0,0 @@ -import useJwt from '@/auth/jwt/useJwt' - -/** - * Return if user is logged in - * This is completely up to you and how you want to store the token in your frontend application - * e.g. If you are using cookies to store the application please update this function - */ -// eslint-disable-next-line arrow-body-style -export const isUserLoggedIn = () => { - return localStorage.getItem('userData') && localStorage.getItem(useJwt.jwtConfig.storageTokenKeyName) -} - -export const getUserData = () => JSON.parse(localStorage.getItem('userData')) - -/** - * This function is used for demo purpose route navigation - * In real app you won't need this function because your app will navigate to same route for each users regardless of ability - * Please note role field is just for showing purpose it's not used by anything in frontend - * We are checking role just for ease - * NOTE: If you have different pages to navigate based on user ability then this function can be useful. However, you need to update it. - * @param {String} userRole Role of user - */ -export const getHomeRouteForLoggedInUser = userRole => { - if (userRole === 'admin') return '/' - if (userRole === 'client') return { name: 'access-control' } - return { name: 'auth-login' } -} diff --git a/src/layouts/horizontal/LayoutHorizontal.vue b/src/layouts/horizontal/LayoutHorizontal.vue deleted file mode 100644 index 03d64a45..00000000 --- a/src/layouts/horizontal/LayoutHorizontal.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/libs/acl/ability.js b/src/libs/acl/ability.js deleted file mode 100644 index e4797040..00000000 --- a/src/libs/acl/ability.js +++ /dev/null @@ -1,11 +0,0 @@ -import { Ability } from '@casl/ability' -import { initialAbility } from './config' - -// Read ability from localStorage -// * Handles auto fetching previous abilities if already logged in user -// ? You can update this if you store user abilities to more secure place -// ! Anyone can update localStorage so be careful and please update this -const userData = JSON.parse(localStorage.getItem('userData')) -const existingAbility = userData ? userData.ability : null - -export default new Ability(existingAbility || initialAbility) diff --git a/src/libs/acl/config.js b/src/libs/acl/config.js deleted file mode 100644 index e0ede0ec..00000000 --- a/src/libs/acl/config.js +++ /dev/null @@ -1,8 +0,0 @@ -export const initialAbility = [ - { - action: 'read', - subject: 'Auth', - }, -] - -export const _ = undefined diff --git a/src/libs/acl/index.js b/src/libs/acl/index.js deleted file mode 100644 index 71bd56ae..00000000 --- a/src/libs/acl/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import Vue from 'vue' -import { abilitiesPlugin } from '@casl/vue' -import ability from './ability' - -Vue.use(abilitiesPlugin, ability) diff --git a/src/libs/acl/routeProtection.js b/src/libs/acl/routeProtection.js deleted file mode 100644 index 31d20766..00000000 --- a/src/libs/acl/routeProtection.js +++ /dev/null @@ -1,5 +0,0 @@ -import ability from './ability' - -export const canNavigate = to => to.matched.some(route => ability.can(route.meta.action || 'read', route.meta.resource)) - -export const _ = undefined diff --git a/src/libs/es6.js b/src/libs/es6.js deleted file mode 100644 index 823704bf..00000000 --- a/src/libs/es6.js +++ /dev/null @@ -1,133168 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -import * as $protobuf from "protobufjs-dbx/minimal"; - -// Common aliases -const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - -// Exported root namespace -const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); - -/** - * Namespace cosmos. - * @exports cosmos - * @namespace - */ - -export const cosmos = $root.cosmos = ((cosmos) => { - - /** - * Namespace auth. - * @memberof cosmos - * @namespace - */ - - cosmos.auth = (function(auth) { - - /** - * Namespace v1beta1. - * @memberof cosmos.auth - * @namespace - */ - - auth.v1beta1 = (function(v1beta1) { - - v1beta1.BaseAccount = (function(BaseAccount) { - - /** - * Properties of a BaseAccount. - * @memberof cosmos.auth.v1beta1 - * @interface IBaseAccount - * @property {string|null} [address] BaseAccount address - * @property {google.protobuf.IAny|null} [pubKey] BaseAccount pubKey - * @property {number|Long|null} [accountNumber] BaseAccount accountNumber - * @property {number|Long|null} [sequence] BaseAccount sequence - */ - - /** - * Constructs a new BaseAccount. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a BaseAccount. - * @implements IBaseAccount - * @constructor - * @param {cosmos.auth.v1beta1.IBaseAccount=} [properties] Properties to set - */ - function BaseAccount(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BaseAccount address. - * @member {string} address - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.address = ""; - - /** - * BaseAccount pubKey. - * @member {google.protobuf.IAny|null|undefined} pubKey - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.pubKey = null; - - /** - * BaseAccount accountNumber. - * @member {number|Long} accountNumber - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * BaseAccount sequence. - * @member {number|Long} sequence - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new BaseAccount instance using the specified properties. - * @function create - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.IBaseAccount=} [properties] Properties to set - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount instance - */ - BaseAccount.create = function create(properties) { - return new BaseAccount(properties); - }; - - /** - * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos.auth.v1beta1.BaseAccount.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.IBaseAccount} message BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) - $root.google.protobuf.Any.encode(message.pubKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.accountNumber); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.BaseAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.IBaseAccount} message BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BaseAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.BaseAccount(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pubKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.accountNumber = reader.uint64(); - break; - case 4: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BaseAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BaseAccount message. - * @function verify - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BaseAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.pubKey != null && message.hasOwnProperty("pubKey")) { - let error = $root.google.protobuf.Any.verify(message.pubKey); - if (error) - return "pubKey." + error; - } - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) - return "accountNumber: integer|Long expected"; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) - return "sequence: integer|Long expected"; - return null; - }; - - /** - * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - */ - BaseAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.BaseAccount) - return object; - let message = new $root.cosmos.auth.v1beta1.BaseAccount(); - if (object.address != null) - message.address = String(object.address); - if (object.pubKey != null) { - if (typeof object.pubKey !== "object") - throw TypeError(".cosmos.auth.v1beta1.BaseAccount.pubKey: object expected"); - message.pubKey = $root.google.protobuf.Any.fromObject(object.pubKey); - } - if (object.accountNumber != null) - if ($util.Long) - (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; - else if (typeof object.accountNumber === "string") - message.accountNumber = parseInt(object.accountNumber, 10); - else if (typeof object.accountNumber === "number") - message.accountNumber = object.accountNumber; - else if (typeof object.accountNumber === "object") - message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); - if (object.sequence != null) - if ($util.Long) - (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; - else if (typeof object.sequence === "string") - message.sequence = parseInt(object.sequence, 10); - else if (typeof object.sequence === "number") - message.sequence = object.sequence; - else if (typeof object.sequence === "object") - message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.BaseAccount} message BaseAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BaseAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.address = ""; - object.pubKey = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.accountNumber = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.pubKey != null && message.hasOwnProperty("pubKey")) - object.pubKey = $root.google.protobuf.Any.toObject(message.pubKey, options); - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - if (typeof message.accountNumber === "number") - object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; - else - object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (typeof message.sequence === "number") - object.sequence = options.longs === String ? String(message.sequence) : message.sequence; - else - object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; - return object; - }; - - /** - * Converts this BaseAccount to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - * @returns {Object.} JSON object - */ - BaseAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BaseAccount; - })(v1beta1.BaseAccount || {}); - - v1beta1.ModuleAccount = (function(ModuleAccount) { - - /** - * Properties of a ModuleAccount. - * @memberof cosmos.auth.v1beta1 - * @interface IModuleAccount - * @property {cosmos.auth.v1beta1.IBaseAccount|null} [baseAccount] ModuleAccount baseAccount - * @property {string|null} [name] ModuleAccount name - * @property {Array.|null} [permissions] ModuleAccount permissions - */ - - /** - * Constructs a new ModuleAccount. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a ModuleAccount. - * @implements IModuleAccount - * @constructor - * @param {cosmos.auth.v1beta1.IModuleAccount=} [properties] Properties to set - */ - function ModuleAccount(properties) { - this.permissions = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModuleAccount baseAccount. - * @member {cosmos.auth.v1beta1.IBaseAccount|null|undefined} baseAccount - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.baseAccount = null; - - /** - * ModuleAccount name. - * @member {string} name - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.name = ""; - - /** - * ModuleAccount permissions. - * @member {Array.} permissions - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.permissions = $util.emptyArray; - - /** - * Creates a new ModuleAccount instance using the specified properties. - * @function create - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.IModuleAccount=} [properties] Properties to set - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount instance - */ - ModuleAccount.create = function create(properties) { - return new ModuleAccount(properties); - }; - - /** - * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos.auth.v1beta1.ModuleAccount.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.IModuleAccount} message ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseAccount != null && Object.hasOwnProperty.call(message, "baseAccount")) - $root.cosmos.auth.v1beta1.BaseAccount.encode(message.baseAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.permissions != null && message.permissions.length) - for (let i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.ModuleAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.IModuleAccount} message ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.ModuleAccount(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleAccount message. - * @function verify - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) { - let error = $root.cosmos.auth.v1beta1.BaseAccount.verify(message.baseAccount); - if (error) - return "baseAccount." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (let i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - */ - ModuleAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.ModuleAccount) - return object; - let message = new $root.cosmos.auth.v1beta1.ModuleAccount(); - if (object.baseAccount != null) { - if (typeof object.baseAccount !== "object") - throw TypeError(".cosmos.auth.v1beta1.ModuleAccount.baseAccount: object expected"); - message.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.fromObject(object.baseAccount); - } - if (object.name != null) - message.name = String(object.name); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".cosmos.auth.v1beta1.ModuleAccount.permissions: array expected"); - message.permissions = []; - for (let i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.ModuleAccount} message ModuleAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) { - object.baseAccount = null; - object.name = ""; - } - if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) - object.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.toObject(message.baseAccount, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (let j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this ModuleAccount to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - * @returns {Object.} JSON object - */ - ModuleAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ModuleAccount; - })(v1beta1.ModuleAccount || {}); - - v1beta1.Params = (function(Params) { - - /** - * Properties of a Params. - * @memberof cosmos.auth.v1beta1 - * @interface IParams - * @property {number|Long|null} [maxMemoCharacters] Params maxMemoCharacters - * @property {number|Long|null} [txSigLimit] Params txSigLimit - * @property {number|Long|null} [txSizeCostPerByte] Params txSizeCostPerByte - * @property {number|Long|null} [sigVerifyCostEd25519] Params sigVerifyCostEd25519 - * @property {number|Long|null} [sigVerifyCostSecp256k1] Params sigVerifyCostSecp256k1 - */ - - /** - * Constructs a new Params. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos.auth.v1beta1.IParams=} [properties] Properties to set - */ - function Params(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params maxMemoCharacters. - * @member {number|Long} maxMemoCharacters - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.maxMemoCharacters = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params txSigLimit. - * @member {number|Long} txSigLimit - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.txSigLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params txSizeCostPerByte. - * @member {number|Long} txSizeCostPerByte - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.txSizeCostPerByte = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params sigVerifyCostEd25519. - * @member {number|Long} sigVerifyCostEd25519 - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.sigVerifyCostEd25519 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params sigVerifyCostSecp256k1. - * @member {number|Long} sigVerifyCostSecp256k1 - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.sigVerifyCostSecp256k1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Params instance using the specified properties. - * @function create - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.IParams=} [properties] Properties to set - * @returns {cosmos.auth.v1beta1.Params} Params instance - */ - Params.create = function create(properties) { - return new Params(properties); - }; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.auth.v1beta1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxMemoCharacters != null && Object.hasOwnProperty.call(message, "maxMemoCharacters")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.maxMemoCharacters); - if (message.txSigLimit != null && Object.hasOwnProperty.call(message, "txSigLimit")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.txSigLimit); - if (message.txSizeCostPerByte != null && Object.hasOwnProperty.call(message, "txSizeCostPerByte")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.txSizeCostPerByte); - if (message.sigVerifyCostEd25519 != null && Object.hasOwnProperty.call(message, "sigVerifyCostEd25519")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sigVerifyCostEd25519); - if (message.sigVerifyCostSecp256k1 != null && Object.hasOwnProperty.call(message, "sigVerifyCostSecp256k1")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.sigVerifyCostSecp256k1); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.maxMemoCharacters = reader.uint64(); - break; - case 2: - message.txSigLimit = reader.uint64(); - break; - case 3: - message.txSizeCostPerByte = reader.uint64(); - break; - case 4: - message.sigVerifyCostEd25519 = reader.uint64(); - break; - case 5: - message.sigVerifyCostSecp256k1 = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.maxMemoCharacters != null && message.hasOwnProperty("maxMemoCharacters")) - if (!$util.isInteger(message.maxMemoCharacters) && !(message.maxMemoCharacters && $util.isInteger(message.maxMemoCharacters.low) && $util.isInteger(message.maxMemoCharacters.high))) - return "maxMemoCharacters: integer|Long expected"; - if (message.txSigLimit != null && message.hasOwnProperty("txSigLimit")) - if (!$util.isInteger(message.txSigLimit) && !(message.txSigLimit && $util.isInteger(message.txSigLimit.low) && $util.isInteger(message.txSigLimit.high))) - return "txSigLimit: integer|Long expected"; - if (message.txSizeCostPerByte != null && message.hasOwnProperty("txSizeCostPerByte")) - if (!$util.isInteger(message.txSizeCostPerByte) && !(message.txSizeCostPerByte && $util.isInteger(message.txSizeCostPerByte.low) && $util.isInteger(message.txSizeCostPerByte.high))) - return "txSizeCostPerByte: integer|Long expected"; - if (message.sigVerifyCostEd25519 != null && message.hasOwnProperty("sigVerifyCostEd25519")) - if (!$util.isInteger(message.sigVerifyCostEd25519) && !(message.sigVerifyCostEd25519 && $util.isInteger(message.sigVerifyCostEd25519.low) && $util.isInteger(message.sigVerifyCostEd25519.high))) - return "sigVerifyCostEd25519: integer|Long expected"; - if (message.sigVerifyCostSecp256k1 != null && message.hasOwnProperty("sigVerifyCostSecp256k1")) - if (!$util.isInteger(message.sigVerifyCostSecp256k1) && !(message.sigVerifyCostSecp256k1 && $util.isInteger(message.sigVerifyCostSecp256k1.low) && $util.isInteger(message.sigVerifyCostSecp256k1.high))) - return "sigVerifyCostSecp256k1: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.Params) - return object; - let message = new $root.cosmos.auth.v1beta1.Params(); - if (object.maxMemoCharacters != null) - if ($util.Long) - (message.maxMemoCharacters = $util.Long.fromValue(object.maxMemoCharacters)).unsigned = true; - else if (typeof object.maxMemoCharacters === "string") - message.maxMemoCharacters = parseInt(object.maxMemoCharacters, 10); - else if (typeof object.maxMemoCharacters === "number") - message.maxMemoCharacters = object.maxMemoCharacters; - else if (typeof object.maxMemoCharacters === "object") - message.maxMemoCharacters = new $util.LongBits(object.maxMemoCharacters.low >>> 0, object.maxMemoCharacters.high >>> 0).toNumber(true); - if (object.txSigLimit != null) - if ($util.Long) - (message.txSigLimit = $util.Long.fromValue(object.txSigLimit)).unsigned = true; - else if (typeof object.txSigLimit === "string") - message.txSigLimit = parseInt(object.txSigLimit, 10); - else if (typeof object.txSigLimit === "number") - message.txSigLimit = object.txSigLimit; - else if (typeof object.txSigLimit === "object") - message.txSigLimit = new $util.LongBits(object.txSigLimit.low >>> 0, object.txSigLimit.high >>> 0).toNumber(true); - if (object.txSizeCostPerByte != null) - if ($util.Long) - (message.txSizeCostPerByte = $util.Long.fromValue(object.txSizeCostPerByte)).unsigned = true; - else if (typeof object.txSizeCostPerByte === "string") - message.txSizeCostPerByte = parseInt(object.txSizeCostPerByte, 10); - else if (typeof object.txSizeCostPerByte === "number") - message.txSizeCostPerByte = object.txSizeCostPerByte; - else if (typeof object.txSizeCostPerByte === "object") - message.txSizeCostPerByte = new $util.LongBits(object.txSizeCostPerByte.low >>> 0, object.txSizeCostPerByte.high >>> 0).toNumber(true); - if (object.sigVerifyCostEd25519 != null) - if ($util.Long) - (message.sigVerifyCostEd25519 = $util.Long.fromValue(object.sigVerifyCostEd25519)).unsigned = true; - else if (typeof object.sigVerifyCostEd25519 === "string") - message.sigVerifyCostEd25519 = parseInt(object.sigVerifyCostEd25519, 10); - else if (typeof object.sigVerifyCostEd25519 === "number") - message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519; - else if (typeof object.sigVerifyCostEd25519 === "object") - message.sigVerifyCostEd25519 = new $util.LongBits(object.sigVerifyCostEd25519.low >>> 0, object.sigVerifyCostEd25519.high >>> 0).toNumber(true); - if (object.sigVerifyCostSecp256k1 != null) - if ($util.Long) - (message.sigVerifyCostSecp256k1 = $util.Long.fromValue(object.sigVerifyCostSecp256k1)).unsigned = true; - else if (typeof object.sigVerifyCostSecp256k1 === "string") - message.sigVerifyCostSecp256k1 = parseInt(object.sigVerifyCostSecp256k1, 10); - else if (typeof object.sigVerifyCostSecp256k1 === "number") - message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1; - else if (typeof object.sigVerifyCostSecp256k1 === "object") - message.sigVerifyCostSecp256k1 = new $util.LongBits(object.sigVerifyCostSecp256k1.low >>> 0, object.sigVerifyCostSecp256k1.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.maxMemoCharacters = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxMemoCharacters = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.txSigLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.txSigLimit = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.txSizeCostPerByte = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.txSizeCostPerByte = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sigVerifyCostEd25519 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sigVerifyCostEd25519 = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sigVerifyCostSecp256k1 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sigVerifyCostSecp256k1 = options.longs === String ? "0" : 0; - } - if (message.maxMemoCharacters != null && message.hasOwnProperty("maxMemoCharacters")) - if (typeof message.maxMemoCharacters === "number") - object.maxMemoCharacters = options.longs === String ? String(message.maxMemoCharacters) : message.maxMemoCharacters; - else - object.maxMemoCharacters = options.longs === String ? $util.Long.prototype.toString.call(message.maxMemoCharacters) : options.longs === Number ? new $util.LongBits(message.maxMemoCharacters.low >>> 0, message.maxMemoCharacters.high >>> 0).toNumber(true) : message.maxMemoCharacters; - if (message.txSigLimit != null && message.hasOwnProperty("txSigLimit")) - if (typeof message.txSigLimit === "number") - object.txSigLimit = options.longs === String ? String(message.txSigLimit) : message.txSigLimit; - else - object.txSigLimit = options.longs === String ? $util.Long.prototype.toString.call(message.txSigLimit) : options.longs === Number ? new $util.LongBits(message.txSigLimit.low >>> 0, message.txSigLimit.high >>> 0).toNumber(true) : message.txSigLimit; - if (message.txSizeCostPerByte != null && message.hasOwnProperty("txSizeCostPerByte")) - if (typeof message.txSizeCostPerByte === "number") - object.txSizeCostPerByte = options.longs === String ? String(message.txSizeCostPerByte) : message.txSizeCostPerByte; - else - object.txSizeCostPerByte = options.longs === String ? $util.Long.prototype.toString.call(message.txSizeCostPerByte) : options.longs === Number ? new $util.LongBits(message.txSizeCostPerByte.low >>> 0, message.txSizeCostPerByte.high >>> 0).toNumber(true) : message.txSizeCostPerByte; - if (message.sigVerifyCostEd25519 != null && message.hasOwnProperty("sigVerifyCostEd25519")) - if (typeof message.sigVerifyCostEd25519 === "number") - object.sigVerifyCostEd25519 = options.longs === String ? String(message.sigVerifyCostEd25519) : message.sigVerifyCostEd25519; - else - object.sigVerifyCostEd25519 = options.longs === String ? $util.Long.prototype.toString.call(message.sigVerifyCostEd25519) : options.longs === Number ? new $util.LongBits(message.sigVerifyCostEd25519.low >>> 0, message.sigVerifyCostEd25519.high >>> 0).toNumber(true) : message.sigVerifyCostEd25519; - if (message.sigVerifyCostSecp256k1 != null && message.hasOwnProperty("sigVerifyCostSecp256k1")) - if (typeof message.sigVerifyCostSecp256k1 === "number") - object.sigVerifyCostSecp256k1 = options.longs === String ? String(message.sigVerifyCostSecp256k1) : message.sigVerifyCostSecp256k1; - else - object.sigVerifyCostSecp256k1 = options.longs === String ? $util.Long.prototype.toString.call(message.sigVerifyCostSecp256k1) : options.longs === Number ? new $util.LongBits(message.sigVerifyCostSecp256k1.low >>> 0, message.sigVerifyCostSecp256k1.high >>> 0).toNumber(true) : message.sigVerifyCostSecp256k1; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(v1beta1.Params || {}); - - v1beta1.GenesisState = (function(GenesisState) { - - /** - * Properties of a GenesisState. - * @memberof cosmos.auth.v1beta1 - * @interface IGenesisState - * @property {cosmos.auth.v1beta1.IParams|null} [params] GenesisState params - * @property {Array.|null} [accounts] GenesisState accounts - */ - - /** - * Constructs a new GenesisState. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {cosmos.auth.v1beta1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.accounts = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {cosmos.auth.v1beta1.IParams|null|undefined} params - * @memberof cosmos.auth.v1beta1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState accounts. - * @member {Array.} accounts - * @memberof cosmos.auth.v1beta1.GenesisState - * @instance - */ - GenesisState.prototype.accounts = $util.emptyArray; - - /** - * Creates a new GenesisState instance using the specified properties. - * @function create - * @memberof cosmos.auth.v1beta1.GenesisState - * @static - * @param {cosmos.auth.v1beta1.IGenesisState=} [properties] Properties to set - * @returns {cosmos.auth.v1beta1.GenesisState} GenesisState instance - */ - GenesisState.create = function create(properties) { - return new GenesisState(properties); - }; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.auth.v1beta1.GenesisState.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.GenesisState - * @static - * @param {cosmos.auth.v1beta1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.cosmos.auth.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.accounts != null && message.accounts.length) - for (let i = 0; i < message.accounts.length; ++i) - $root.google.protobuf.Any.encode(message.accounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.GenesisState - * @static - * @param {cosmos.auth.v1beta1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.cosmos.auth.v1beta1.Params.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.accounts && message.accounts.length)) - message.accounts = []; - message.accounts.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof cosmos.auth.v1beta1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.cosmos.auth.v1beta1.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.accounts != null && message.hasOwnProperty("accounts")) { - if (!Array.isArray(message.accounts)) - return "accounts: array expected"; - for (let i = 0; i < message.accounts.length; ++i) { - let error = $root.google.protobuf.Any.verify(message.accounts[i]); - if (error) - return "accounts." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.GenesisState) - return object; - let message = new $root.cosmos.auth.v1beta1.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".cosmos.auth.v1beta1.GenesisState.params: object expected"); - message.params = $root.cosmos.auth.v1beta1.Params.fromObject(object.params); - } - if (object.accounts) { - if (!Array.isArray(object.accounts)) - throw TypeError(".cosmos.auth.v1beta1.GenesisState.accounts: array expected"); - message.accounts = []; - for (let i = 0; i < object.accounts.length; ++i) { - if (typeof object.accounts[i] !== "object") - throw TypeError(".cosmos.auth.v1beta1.GenesisState.accounts: object expected"); - message.accounts[i] = $root.google.protobuf.Any.fromObject(object.accounts[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.GenesisState - * @static - * @param {cosmos.auth.v1beta1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.accounts = []; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.cosmos.auth.v1beta1.Params.toObject(message.params, options); - if (message.accounts && message.accounts.length) { - object.accounts = []; - for (let j = 0; j < message.accounts.length; ++j) - object.accounts[j] = $root.google.protobuf.Any.toObject(message.accounts[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(v1beta1.GenesisState || {}); - - v1beta1.Query = (function(Query) { - - /** - * Constructs a new Query service. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a Query - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Query(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; - - /** - * Creates new Query service using the specified rpc implementation. - * @function create - * @memberof cosmos.auth.v1beta1.Query - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Query} RPC service. Useful where requests and/or responses are streamed. - */ - Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link cosmos.auth.v1beta1.Query#account}. - * @memberof cosmos.auth.v1beta1.Query - * @typedef AccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.auth.v1beta1.IQueryAccountResponse} [response] QueryAccountResponse - */ - - /** - * Calls Account. - * @function account - * @memberof cosmos.auth.v1beta1.Query - * @instance - * @param {cosmos.auth.v1beta1.IQueryAccountRequest} request QueryAccountRequest message or plain object - * @param {cosmos.auth.v1beta1.Query.AccountCallback} callback Node-style callback called with the error, if any, and QueryAccountResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.account = function account(request, callback) { - return this.rpcCall(account, $root.cosmos.auth.v1beta1.QueryAccountRequest, $root.cosmos.auth.v1beta1.QueryAccountResponse, request, callback); - }, "name", { value: "Account" }); - - /** - * Calls Account. - * @function account - * @memberof cosmos.auth.v1beta1.Query - * @instance - * @param {cosmos.auth.v1beta1.IQueryAccountRequest} request QueryAccountRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.auth.v1beta1.Query#params}. - * @memberof cosmos.auth.v1beta1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.auth.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof cosmos.auth.v1beta1.Query - * @instance - * @param {cosmos.auth.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {cosmos.auth.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.cosmos.auth.v1beta1.QueryParamsRequest, $root.cosmos.auth.v1beta1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof cosmos.auth.v1beta1.Query - * @instance - * @param {cosmos.auth.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(v1beta1.Query || {}); - - v1beta1.QueryAccountRequest = (function(QueryAccountRequest) { - - /** - * Properties of a QueryAccountRequest. - * @memberof cosmos.auth.v1beta1 - * @interface IQueryAccountRequest - * @property {string|null} [address] QueryAccountRequest address - */ - - /** - * Constructs a new QueryAccountRequest. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a QueryAccountRequest. - * @implements IQueryAccountRequest - * @constructor - * @param {cosmos.auth.v1beta1.IQueryAccountRequest=} [properties] Properties to set - */ - function QueryAccountRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAccountRequest address. - * @member {string} address - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @instance - */ - QueryAccountRequest.prototype.address = ""; - - /** - * Creates a new QueryAccountRequest instance using the specified properties. - * @function create - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @static - * @param {cosmos.auth.v1beta1.IQueryAccountRequest=} [properties] Properties to set - * @returns {cosmos.auth.v1beta1.QueryAccountRequest} QueryAccountRequest instance - */ - QueryAccountRequest.create = function create(properties) { - return new QueryAccountRequest(properties); - }; - - /** - * Encodes the specified QueryAccountRequest message. Does not implicitly {@link cosmos.auth.v1beta1.QueryAccountRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @static - * @param {cosmos.auth.v1beta1.IQueryAccountRequest} message QueryAccountRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAccountRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - return writer; - }; - - /** - * Encodes the specified QueryAccountRequest message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.QueryAccountRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @static - * @param {cosmos.auth.v1beta1.IQueryAccountRequest} message QueryAccountRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAccountRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.QueryAccountRequest} QueryAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAccountRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.QueryAccountRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAccountRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.QueryAccountRequest} QueryAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAccountRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAccountRequest message. - * @function verify - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAccountRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - return null; - }; - - /** - * Creates a QueryAccountRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.QueryAccountRequest} QueryAccountRequest - */ - QueryAccountRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.QueryAccountRequest) - return object; - let message = new $root.cosmos.auth.v1beta1.QueryAccountRequest(); - if (object.address != null) - message.address = String(object.address); - return message; - }; - - /** - * Creates a plain object from a QueryAccountRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @static - * @param {cosmos.auth.v1beta1.QueryAccountRequest} message QueryAccountRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAccountRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.address = ""; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - return object; - }; - - /** - * Converts this QueryAccountRequest to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.QueryAccountRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAccountRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAccountRequest; - })(v1beta1.QueryAccountRequest || {}); - - v1beta1.QueryAccountResponse = (function(QueryAccountResponse) { - - /** - * Properties of a QueryAccountResponse. - * @memberof cosmos.auth.v1beta1 - * @interface IQueryAccountResponse - * @property {google.protobuf.IAny|null} [account] QueryAccountResponse account - */ - - /** - * Constructs a new QueryAccountResponse. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a QueryAccountResponse. - * @implements IQueryAccountResponse - * @constructor - * @param {cosmos.auth.v1beta1.IQueryAccountResponse=} [properties] Properties to set - */ - function QueryAccountResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAccountResponse account. - * @member {google.protobuf.IAny|null|undefined} account - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @instance - */ - QueryAccountResponse.prototype.account = null; - - /** - * Creates a new QueryAccountResponse instance using the specified properties. - * @function create - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @static - * @param {cosmos.auth.v1beta1.IQueryAccountResponse=} [properties] Properties to set - * @returns {cosmos.auth.v1beta1.QueryAccountResponse} QueryAccountResponse instance - */ - QueryAccountResponse.create = function create(properties) { - return new QueryAccountResponse(properties); - }; - - /** - * Encodes the specified QueryAccountResponse message. Does not implicitly {@link cosmos.auth.v1beta1.QueryAccountResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @static - * @param {cosmos.auth.v1beta1.IQueryAccountResponse} message QueryAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAccountResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.account != null && Object.hasOwnProperty.call(message, "account")) - $root.google.protobuf.Any.encode(message.account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryAccountResponse message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.QueryAccountResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @static - * @param {cosmos.auth.v1beta1.IQueryAccountResponse} message QueryAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAccountResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.QueryAccountResponse} QueryAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAccountResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.QueryAccountResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.account = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAccountResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.QueryAccountResponse} QueryAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAccountResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAccountResponse message. - * @function verify - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAccountResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.account != null && message.hasOwnProperty("account")) { - let error = $root.google.protobuf.Any.verify(message.account); - if (error) - return "account." + error; - } - return null; - }; - - /** - * Creates a QueryAccountResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.QueryAccountResponse} QueryAccountResponse - */ - QueryAccountResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.QueryAccountResponse) - return object; - let message = new $root.cosmos.auth.v1beta1.QueryAccountResponse(); - if (object.account != null) { - if (typeof object.account !== "object") - throw TypeError(".cosmos.auth.v1beta1.QueryAccountResponse.account: object expected"); - message.account = $root.google.protobuf.Any.fromObject(object.account); - } - return message; - }; - - /** - * Creates a plain object from a QueryAccountResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @static - * @param {cosmos.auth.v1beta1.QueryAccountResponse} message QueryAccountResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAccountResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.account = null; - if (message.account != null && message.hasOwnProperty("account")) - object.account = $root.google.protobuf.Any.toObject(message.account, options); - return object; - }; - - /** - * Converts this QueryAccountResponse to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.QueryAccountResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAccountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAccountResponse; - })(v1beta1.QueryAccountResponse || {}); - - v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { - - /** - * Properties of a QueryParamsRequest. - * @memberof cosmos.auth.v1beta1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {cosmos.auth.v1beta1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new QueryParamsRequest instance using the specified properties. - * @function create - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @static - * @param {cosmos.auth.v1beta1.IQueryParamsRequest=} [properties] Properties to set - * @returns {cosmos.auth.v1beta1.QueryParamsRequest} QueryParamsRequest instance - */ - QueryParamsRequest.create = function create(properties) { - return new QueryParamsRequest(properties); - }; - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.auth.v1beta1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @static - * @param {cosmos.auth.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @static - * @param {cosmos.auth.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.QueryParamsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.QueryParamsRequest) - return object; - return new $root.cosmos.auth.v1beta1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @static - * @param {cosmos.auth.v1beta1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(v1beta1.QueryParamsRequest || {}); - - v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { - - /** - * Properties of a QueryParamsResponse. - * @memberof cosmos.auth.v1beta1 - * @interface IQueryParamsResponse - * @property {cosmos.auth.v1beta1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {cosmos.auth.v1beta1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {cosmos.auth.v1beta1.IParams|null|undefined} params - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Creates a new QueryParamsResponse instance using the specified properties. - * @function create - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @static - * @param {cosmos.auth.v1beta1.IQueryParamsResponse=} [properties] Properties to set - * @returns {cosmos.auth.v1beta1.QueryParamsResponse} QueryParamsResponse instance - */ - QueryParamsResponse.create = function create(properties) { - return new QueryParamsResponse(properties); - }; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.auth.v1beta1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @static - * @param {cosmos.auth.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.cosmos.auth.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @static - * @param {cosmos.auth.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.QueryParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.cosmos.auth.v1beta1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.cosmos.auth.v1beta1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.QueryParamsResponse) - return object; - let message = new $root.cosmos.auth.v1beta1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".cosmos.auth.v1beta1.QueryParamsResponse.params: object expected"); - message.params = $root.cosmos.auth.v1beta1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @static - * @param {cosmos.auth.v1beta1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.cosmos.auth.v1beta1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(v1beta1.QueryParamsResponse || {}); - - return v1beta1; - })(auth.v1beta1 || {}); - - return auth; - })(cosmos.auth || {}); - - /** - * Namespace bank. - * @memberof cosmos - * @namespace - */ - - cosmos.bank = (function(bank) { - - /** - * Namespace v1beta1. - * @memberof cosmos.bank - * @namespace - */ - - bank.v1beta1 = (function(v1beta1) { - - v1beta1.Params = (function(Params) { - - /** - * Properties of a Params. - * @memberof cosmos.bank.v1beta1 - * @interface IParams - * @property {Array.|null} [sendEnabled] Params sendEnabled - * @property {boolean|null} [defaultSendEnabled] Params defaultSendEnabled - */ - - /** - * Constructs a new Params. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.sendEnabled = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params sendEnabled. - * @member {Array.} sendEnabled - * @memberof cosmos.bank.v1beta1.Params - * @instance - */ - Params.prototype.sendEnabled = $util.emptyArray; - - /** - * Params defaultSendEnabled. - * @member {boolean} defaultSendEnabled - * @memberof cosmos.bank.v1beta1.Params - * @instance - */ - Params.prototype.defaultSendEnabled = false; - - /** - * Creates a new Params instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.Params} Params instance - */ - Params.create = function create(properties) { - return new Params(properties); - }; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sendEnabled != null && message.sendEnabled.length) - for (let i = 0; i < message.sendEnabled.length; ++i) - $root.cosmos.bank.v1beta1.SendEnabled.encode(message.sendEnabled[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.defaultSendEnabled != null && Object.hasOwnProperty.call(message, "defaultSendEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.defaultSendEnabled); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sendEnabled && message.sendEnabled.length)) - message.sendEnabled = []; - message.sendEnabled.push($root.cosmos.bank.v1beta1.SendEnabled.decode(reader, reader.uint32())); - break; - case 2: - message.defaultSendEnabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sendEnabled != null && message.hasOwnProperty("sendEnabled")) { - if (!Array.isArray(message.sendEnabled)) - return "sendEnabled: array expected"; - for (let i = 0; i < message.sendEnabled.length; ++i) { - let error = $root.cosmos.bank.v1beta1.SendEnabled.verify(message.sendEnabled[i]); - if (error) - return "sendEnabled." + error; - } - } - if (message.defaultSendEnabled != null && message.hasOwnProperty("defaultSendEnabled")) - if (typeof message.defaultSendEnabled !== "boolean") - return "defaultSendEnabled: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Params) - return object; - let message = new $root.cosmos.bank.v1beta1.Params(); - if (object.sendEnabled) { - if (!Array.isArray(object.sendEnabled)) - throw TypeError(".cosmos.bank.v1beta1.Params.sendEnabled: array expected"); - message.sendEnabled = []; - for (let i = 0; i < object.sendEnabled.length; ++i) { - if (typeof object.sendEnabled[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Params.sendEnabled: object expected"); - message.sendEnabled[i] = $root.cosmos.bank.v1beta1.SendEnabled.fromObject(object.sendEnabled[i]); - } - } - if (object.defaultSendEnabled != null) - message.defaultSendEnabled = Boolean(object.defaultSendEnabled); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {cosmos.bank.v1beta1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.sendEnabled = []; - if (options.defaults) - object.defaultSendEnabled = false; - if (message.sendEnabled && message.sendEnabled.length) { - object.sendEnabled = []; - for (let j = 0; j < message.sendEnabled.length; ++j) - object.sendEnabled[j] = $root.cosmos.bank.v1beta1.SendEnabled.toObject(message.sendEnabled[j], options); - } - if (message.defaultSendEnabled != null && message.hasOwnProperty("defaultSendEnabled")) - object.defaultSendEnabled = message.defaultSendEnabled; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(v1beta1.Params || {}); - - v1beta1.SendEnabled = (function(SendEnabled) { - - /** - * Properties of a SendEnabled. - * @memberof cosmos.bank.v1beta1 - * @interface ISendEnabled - * @property {string|null} [denom] SendEnabled denom - * @property {boolean|null} [enabled] SendEnabled enabled - */ - - /** - * Constructs a new SendEnabled. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a SendEnabled. - * @implements ISendEnabled - * @constructor - * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set - */ - function SendEnabled(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SendEnabled denom. - * @member {string} denom - * @memberof cosmos.bank.v1beta1.SendEnabled - * @instance - */ - SendEnabled.prototype.denom = ""; - - /** - * SendEnabled enabled. - * @member {boolean} enabled - * @memberof cosmos.bank.v1beta1.SendEnabled - * @instance - */ - SendEnabled.prototype.enabled = false; - - /** - * Creates a new SendEnabled instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled instance - */ - SendEnabled.create = function create(properties) { - return new SendEnabled(properties); - }; - - /** - * Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SendEnabled.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified SendEnabled message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SendEnabled.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SendEnabled message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SendEnabled.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.SendEnabled(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SendEnabled message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SendEnabled.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SendEnabled message. - * @function verify - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SendEnabled.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a SendEnabled message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled - */ - SendEnabled.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.SendEnabled) - return object; - let message = new $root.cosmos.bank.v1beta1.SendEnabled(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a SendEnabled message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {cosmos.bank.v1beta1.SendEnabled} message SendEnabled - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SendEnabled.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.denom = ""; - object.enabled = false; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this SendEnabled to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.SendEnabled - * @instance - * @returns {Object.} JSON object - */ - SendEnabled.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SendEnabled; - })(v1beta1.SendEnabled || {}); - - v1beta1.Input = (function(Input) { - - /** - * Properties of an Input. - * @memberof cosmos.bank.v1beta1 - * @interface IInput - * @property {string|null} [address] Input address - * @property {Array.|null} [coins] Input coins - */ - - /** - * Constructs a new Input. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents an Input. - * @implements IInput - * @constructor - * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set - */ - function Input(properties) { - this.coins = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Input address. - * @member {string} address - * @memberof cosmos.bank.v1beta1.Input - * @instance - */ - Input.prototype.address = ""; - - /** - * Input coins. - * @member {Array.} coins - * @memberof cosmos.bank.v1beta1.Input - * @instance - */ - Input.prototype.coins = $util.emptyArray; - - /** - * Creates a new Input instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.Input} Input instance - */ - Input.create = function create(properties) { - return new Input(properties); - }; - - /** - * Encodes the specified Input message. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Input.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.coins != null && message.coins.length) - for (let i = 0; i < message.coins.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Input.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Input message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Input(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - if (!(message.coins && message.coins.length)) - message.coins = []; - message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Input message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Input message. - * @function verify - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Input.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.coins != null && message.hasOwnProperty("coins")) { - if (!Array.isArray(message.coins)) - return "coins: array expected"; - for (let i = 0; i < message.coins.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); - if (error) - return "coins." + error; - } - } - return null; - }; - - /** - * Creates an Input message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Input} Input - */ - Input.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Input) - return object; - let message = new $root.cosmos.bank.v1beta1.Input(); - if (object.address != null) - message.address = String(object.address); - if (object.coins) { - if (!Array.isArray(object.coins)) - throw TypeError(".cosmos.bank.v1beta1.Input.coins: array expected"); - message.coins = []; - for (let i = 0; i < object.coins.length; ++i) { - if (typeof object.coins[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Input.coins: object expected"); - message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Input message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {cosmos.bank.v1beta1.Input} message Input - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Input.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.coins = []; - if (options.defaults) - object.address = ""; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.coins && message.coins.length) { - object.coins = []; - for (let j = 0; j < message.coins.length; ++j) - object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); - } - return object; - }; - - /** - * Converts this Input to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Input - * @instance - * @returns {Object.} JSON object - */ - Input.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Input; - })(v1beta1.Input || {}); - - v1beta1.Output = (function(Output) { - - /** - * Properties of an Output. - * @memberof cosmos.bank.v1beta1 - * @interface IOutput - * @property {string|null} [address] Output address - * @property {Array.|null} [coins] Output coins - */ - - /** - * Constructs a new Output. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents an Output. - * @implements IOutput - * @constructor - * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set - */ - function Output(properties) { - this.coins = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Output address. - * @member {string} address - * @memberof cosmos.bank.v1beta1.Output - * @instance - */ - Output.prototype.address = ""; - - /** - * Output coins. - * @member {Array.} coins - * @memberof cosmos.bank.v1beta1.Output - * @instance - */ - Output.prototype.coins = $util.emptyArray; - - /** - * Creates a new Output instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.Output} Output instance - */ - Output.create = function create(properties) { - return new Output(properties); - }; - - /** - * Encodes the specified Output message. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Output.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.coins != null && message.coins.length) - for (let i = 0; i < message.coins.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Output.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Output message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Output(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - if (!(message.coins && message.coins.length)) - message.coins = []; - message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Output message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Output message. - * @function verify - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Output.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.coins != null && message.hasOwnProperty("coins")) { - if (!Array.isArray(message.coins)) - return "coins: array expected"; - for (let i = 0; i < message.coins.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); - if (error) - return "coins." + error; - } - } - return null; - }; - - /** - * Creates an Output message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Output} Output - */ - Output.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Output) - return object; - let message = new $root.cosmos.bank.v1beta1.Output(); - if (object.address != null) - message.address = String(object.address); - if (object.coins) { - if (!Array.isArray(object.coins)) - throw TypeError(".cosmos.bank.v1beta1.Output.coins: array expected"); - message.coins = []; - for (let i = 0; i < object.coins.length; ++i) { - if (typeof object.coins[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Output.coins: object expected"); - message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Output message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {cosmos.bank.v1beta1.Output} message Output - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Output.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.coins = []; - if (options.defaults) - object.address = ""; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.coins && message.coins.length) { - object.coins = []; - for (let j = 0; j < message.coins.length; ++j) - object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); - } - return object; - }; - - /** - * Converts this Output to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Output - * @instance - * @returns {Object.} JSON object - */ - Output.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Output; - })(v1beta1.Output || {}); - - v1beta1.Supply = (function(Supply) { - - /** - * Properties of a Supply. - * @memberof cosmos.bank.v1beta1 - * @interface ISupply - * @property {Array.|null} [total] Supply total - */ - - /** - * Constructs a new Supply. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Supply. - * @implements ISupply - * @constructor - * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set - */ - function Supply(properties) { - this.total = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Supply total. - * @member {Array.} total - * @memberof cosmos.bank.v1beta1.Supply - * @instance - */ - Supply.prototype.total = $util.emptyArray; - - /** - * Creates a new Supply instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.Supply} Supply instance - */ - Supply.create = function create(properties) { - return new Supply(properties); - }; - - /** - * Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Supply.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.total != null && message.total.length) - for (let i = 0; i < message.total.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Supply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Supply message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Supply} Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Supply.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Supply(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.total && message.total.length)) - message.total = []; - message.total.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Supply message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Supply} Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Supply.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Supply message. - * @function verify - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Supply.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.total != null && message.hasOwnProperty("total")) { - if (!Array.isArray(message.total)) - return "total: array expected"; - for (let i = 0; i < message.total.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.total[i]); - if (error) - return "total." + error; - } - } - return null; - }; - - /** - * Creates a Supply message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Supply} Supply - */ - Supply.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Supply) - return object; - let message = new $root.cosmos.bank.v1beta1.Supply(); - if (object.total) { - if (!Array.isArray(object.total)) - throw TypeError(".cosmos.bank.v1beta1.Supply.total: array expected"); - message.total = []; - for (let i = 0; i < object.total.length; ++i) { - if (typeof object.total[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Supply.total: object expected"); - message.total[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Supply message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {cosmos.bank.v1beta1.Supply} message Supply - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Supply.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.total = []; - if (message.total && message.total.length) { - object.total = []; - for (let j = 0; j < message.total.length; ++j) - object.total[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total[j], options); - } - return object; - }; - - /** - * Converts this Supply to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Supply - * @instance - * @returns {Object.} JSON object - */ - Supply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Supply; - })(v1beta1.Supply || {}); - - v1beta1.DenomUnit = (function(DenomUnit) { - - /** - * Properties of a DenomUnit. - * @memberof cosmos.bank.v1beta1 - * @interface IDenomUnit - * @property {string|null} [denom] DenomUnit denom - * @property {number|null} [exponent] DenomUnit exponent - * @property {Array.|null} [aliases] DenomUnit aliases - */ - - /** - * Constructs a new DenomUnit. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a DenomUnit. - * @implements IDenomUnit - * @constructor - * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set - */ - function DenomUnit(properties) { - this.aliases = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DenomUnit denom. - * @member {string} denom - * @memberof cosmos.bank.v1beta1.DenomUnit - * @instance - */ - DenomUnit.prototype.denom = ""; - - /** - * DenomUnit exponent. - * @member {number} exponent - * @memberof cosmos.bank.v1beta1.DenomUnit - * @instance - */ - DenomUnit.prototype.exponent = 0; - - /** - * DenomUnit aliases. - * @member {Array.} aliases - * @memberof cosmos.bank.v1beta1.DenomUnit - * @instance - */ - DenomUnit.prototype.aliases = $util.emptyArray; - - /** - * Creates a new DenomUnit instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit instance - */ - DenomUnit.create = function create(properties) { - return new DenomUnit(properties); - }; - - /** - * Encodes the specified DenomUnit message. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomUnit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.exponent); - if (message.aliases != null && message.aliases.length) - for (let i = 0; i < message.aliases.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.aliases[i]); - return writer; - }; - - /** - * Encodes the specified DenomUnit message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomUnit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DenomUnit message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomUnit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.DenomUnit(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - if (!(message.aliases && message.aliases.length)) - message.aliases = []; - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DenomUnit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomUnit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DenomUnit message. - * @function verify - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DenomUnit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - if (message.exponent != null && message.hasOwnProperty("exponent")) - if (!$util.isInteger(message.exponent)) - return "exponent: integer expected"; - if (message.aliases != null && message.hasOwnProperty("aliases")) { - if (!Array.isArray(message.aliases)) - return "aliases: array expected"; - for (let i = 0; i < message.aliases.length; ++i) - if (!$util.isString(message.aliases[i])) - return "aliases: string[] expected"; - } - return null; - }; - - /** - * Creates a DenomUnit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit - */ - DenomUnit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.DenomUnit) - return object; - let message = new $root.cosmos.bank.v1beta1.DenomUnit(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.exponent != null) - message.exponent = object.exponent >>> 0; - if (object.aliases) { - if (!Array.isArray(object.aliases)) - throw TypeError(".cosmos.bank.v1beta1.DenomUnit.aliases: array expected"); - message.aliases = []; - for (let i = 0; i < object.aliases.length; ++i) - message.aliases[i] = String(object.aliases[i]); - } - return message; - }; - - /** - * Creates a plain object from a DenomUnit message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {cosmos.bank.v1beta1.DenomUnit} message DenomUnit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DenomUnit.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.aliases = []; - if (options.defaults) { - object.denom = ""; - object.exponent = 0; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.exponent != null && message.hasOwnProperty("exponent")) - object.exponent = message.exponent; - if (message.aliases && message.aliases.length) { - object.aliases = []; - for (let j = 0; j < message.aliases.length; ++j) - object.aliases[j] = message.aliases[j]; - } - return object; - }; - - /** - * Converts this DenomUnit to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.DenomUnit - * @instance - * @returns {Object.} JSON object - */ - DenomUnit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DenomUnit; - })(v1beta1.DenomUnit || {}); - - v1beta1.Metadata = (function(Metadata) { - - /** - * Properties of a Metadata. - * @memberof cosmos.bank.v1beta1 - * @interface IMetadata - * @property {string|null} [description] Metadata description - * @property {Array.|null} [denomUnits] Metadata denomUnits - * @property {string|null} [base] Metadata base - * @property {string|null} [display] Metadata display - */ - - /** - * Constructs a new Metadata. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - this.denomUnits = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata description. - * @member {string} description - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.description = ""; - - /** - * Metadata denomUnits. - * @member {Array.} denomUnits - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.denomUnits = $util.emptyArray; - - /** - * Metadata base. - * @member {string} base - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.base = ""; - - /** - * Metadata display. - * @member {string} display - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.display = ""; - - /** - * Creates a new Metadata instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.Metadata} Metadata instance - */ - Metadata.create = function create(properties) { - return new Metadata(properties); - }; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.denomUnits != null && message.denomUnits.length) - for (let i = 0; i < message.denomUnits.length; ++i) - $root.cosmos.bank.v1beta1.DenomUnit.encode(message.denomUnits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.base != null && Object.hasOwnProperty.call(message, "base")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.base); - if (message.display != null && Object.hasOwnProperty.call(message, "display")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.display); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Metadata(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - if (!(message.denomUnits && message.denomUnits.length)) - message.denomUnits = []; - message.denomUnits.push($root.cosmos.bank.v1beta1.DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.denomUnits != null && message.hasOwnProperty("denomUnits")) { - if (!Array.isArray(message.denomUnits)) - return "denomUnits: array expected"; - for (let i = 0; i < message.denomUnits.length; ++i) { - let error = $root.cosmos.bank.v1beta1.DenomUnit.verify(message.denomUnits[i]); - if (error) - return "denomUnits." + error; - } - } - if (message.base != null && message.hasOwnProperty("base")) - if (!$util.isString(message.base)) - return "base: string expected"; - if (message.display != null && message.hasOwnProperty("display")) - if (!$util.isString(message.display)) - return "display: string expected"; - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Metadata) - return object; - let message = new $root.cosmos.bank.v1beta1.Metadata(); - if (object.description != null) - message.description = String(object.description); - if (object.denomUnits) { - if (!Array.isArray(object.denomUnits)) - throw TypeError(".cosmos.bank.v1beta1.Metadata.denomUnits: array expected"); - message.denomUnits = []; - for (let i = 0; i < object.denomUnits.length; ++i) { - if (typeof object.denomUnits[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Metadata.denomUnits: object expected"); - message.denomUnits[i] = $root.cosmos.bank.v1beta1.DenomUnit.fromObject(object.denomUnits[i]); - } - } - if (object.base != null) - message.base = String(object.base); - if (object.display != null) - message.display = String(object.display); - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {cosmos.bank.v1beta1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.denomUnits = []; - if (options.defaults) { - object.description = ""; - object.base = ""; - object.display = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.denomUnits && message.denomUnits.length) { - object.denomUnits = []; - for (let j = 0; j < message.denomUnits.length; ++j) - object.denomUnits[j] = $root.cosmos.bank.v1beta1.DenomUnit.toObject(message.denomUnits[j], options); - } - if (message.base != null && message.hasOwnProperty("base")) - object.base = message.base; - if (message.display != null && message.hasOwnProperty("display")) - object.display = message.display; - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Metadata; - })(v1beta1.Metadata || {}); - - v1beta1.GenesisState = (function(GenesisState) { - - /** - * Properties of a GenesisState. - * @memberof cosmos.bank.v1beta1 - * @interface IGenesisState - * @property {cosmos.bank.v1beta1.IParams|null} [params] GenesisState params - * @property {Array.|null} [balances] GenesisState balances - * @property {Array.|null} [supply] GenesisState supply - * @property {Array.|null} [denomMetadata] GenesisState denomMetadata - */ - - /** - * Constructs a new GenesisState. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {cosmos.bank.v1beta1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.balances = []; - this.supply = []; - this.denomMetadata = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {cosmos.bank.v1beta1.IParams|null|undefined} params - * @memberof cosmos.bank.v1beta1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState balances. - * @member {Array.} balances - * @memberof cosmos.bank.v1beta1.GenesisState - * @instance - */ - GenesisState.prototype.balances = $util.emptyArray; - - /** - * GenesisState supply. - * @member {Array.} supply - * @memberof cosmos.bank.v1beta1.GenesisState - * @instance - */ - GenesisState.prototype.supply = $util.emptyArray; - - /** - * GenesisState denomMetadata. - * @member {Array.} denomMetadata - * @memberof cosmos.bank.v1beta1.GenesisState - * @instance - */ - GenesisState.prototype.denomMetadata = $util.emptyArray; - - /** - * Creates a new GenesisState instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.GenesisState - * @static - * @param {cosmos.bank.v1beta1.IGenesisState=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.GenesisState} GenesisState instance - */ - GenesisState.create = function create(properties) { - return new GenesisState(properties); - }; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.bank.v1beta1.GenesisState.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.GenesisState - * @static - * @param {cosmos.bank.v1beta1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.cosmos.bank.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.balances != null && message.balances.length) - for (let i = 0; i < message.balances.length; ++i) - $root.cosmos.bank.v1beta1.Balance.encode(message.balances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.supply != null && message.supply.length) - for (let i = 0; i < message.supply.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.supply[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.denomMetadata != null && message.denomMetadata.length) - for (let i = 0; i < message.denomMetadata.length; ++i) - $root.cosmos.bank.v1beta1.Metadata.encode(message.denomMetadata[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.GenesisState - * @static - * @param {cosmos.bank.v1beta1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.cosmos.bank.v1beta1.Params.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.balances && message.balances.length)) - message.balances = []; - message.balances.push($root.cosmos.bank.v1beta1.Balance.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.supply && message.supply.length)) - message.supply = []; - message.supply.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.denomMetadata && message.denomMetadata.length)) - message.denomMetadata = []; - message.denomMetadata.push($root.cosmos.bank.v1beta1.Metadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof cosmos.bank.v1beta1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.cosmos.bank.v1beta1.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.balances != null && message.hasOwnProperty("balances")) { - if (!Array.isArray(message.balances)) - return "balances: array expected"; - for (let i = 0; i < message.balances.length; ++i) { - let error = $root.cosmos.bank.v1beta1.Balance.verify(message.balances[i]); - if (error) - return "balances." + error; - } - } - if (message.supply != null && message.hasOwnProperty("supply")) { - if (!Array.isArray(message.supply)) - return "supply: array expected"; - for (let i = 0; i < message.supply.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.supply[i]); - if (error) - return "supply." + error; - } - } - if (message.denomMetadata != null && message.hasOwnProperty("denomMetadata")) { - if (!Array.isArray(message.denomMetadata)) - return "denomMetadata: array expected"; - for (let i = 0; i < message.denomMetadata.length; ++i) { - let error = $root.cosmos.bank.v1beta1.Metadata.verify(message.denomMetadata[i]); - if (error) - return "denomMetadata." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.GenesisState) - return object; - let message = new $root.cosmos.bank.v1beta1.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".cosmos.bank.v1beta1.GenesisState.params: object expected"); - message.params = $root.cosmos.bank.v1beta1.Params.fromObject(object.params); - } - if (object.balances) { - if (!Array.isArray(object.balances)) - throw TypeError(".cosmos.bank.v1beta1.GenesisState.balances: array expected"); - message.balances = []; - for (let i = 0; i < object.balances.length; ++i) { - if (typeof object.balances[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.GenesisState.balances: object expected"); - message.balances[i] = $root.cosmos.bank.v1beta1.Balance.fromObject(object.balances[i]); - } - } - if (object.supply) { - if (!Array.isArray(object.supply)) - throw TypeError(".cosmos.bank.v1beta1.GenesisState.supply: array expected"); - message.supply = []; - for (let i = 0; i < object.supply.length; ++i) { - if (typeof object.supply[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.GenesisState.supply: object expected"); - message.supply[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.supply[i]); - } - } - if (object.denomMetadata) { - if (!Array.isArray(object.denomMetadata)) - throw TypeError(".cosmos.bank.v1beta1.GenesisState.denomMetadata: array expected"); - message.denomMetadata = []; - for (let i = 0; i < object.denomMetadata.length; ++i) { - if (typeof object.denomMetadata[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.GenesisState.denomMetadata: object expected"); - message.denomMetadata[i] = $root.cosmos.bank.v1beta1.Metadata.fromObject(object.denomMetadata[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.GenesisState - * @static - * @param {cosmos.bank.v1beta1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.balances = []; - object.supply = []; - object.denomMetadata = []; - } - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.cosmos.bank.v1beta1.Params.toObject(message.params, options); - if (message.balances && message.balances.length) { - object.balances = []; - for (let j = 0; j < message.balances.length; ++j) - object.balances[j] = $root.cosmos.bank.v1beta1.Balance.toObject(message.balances[j], options); - } - if (message.supply && message.supply.length) { - object.supply = []; - for (let j = 0; j < message.supply.length; ++j) - object.supply[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.supply[j], options); - } - if (message.denomMetadata && message.denomMetadata.length) { - object.denomMetadata = []; - for (let j = 0; j < message.denomMetadata.length; ++j) - object.denomMetadata[j] = $root.cosmos.bank.v1beta1.Metadata.toObject(message.denomMetadata[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(v1beta1.GenesisState || {}); - - v1beta1.Balance = (function(Balance) { - - /** - * Properties of a Balance. - * @memberof cosmos.bank.v1beta1 - * @interface IBalance - * @property {string|null} [address] Balance address - * @property {Array.|null} [coins] Balance coins - */ - - /** - * Constructs a new Balance. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Balance. - * @implements IBalance - * @constructor - * @param {cosmos.bank.v1beta1.IBalance=} [properties] Properties to set - */ - function Balance(properties) { - this.coins = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Balance address. - * @member {string} address - * @memberof cosmos.bank.v1beta1.Balance - * @instance - */ - Balance.prototype.address = ""; - - /** - * Balance coins. - * @member {Array.} coins - * @memberof cosmos.bank.v1beta1.Balance - * @instance - */ - Balance.prototype.coins = $util.emptyArray; - - /** - * Creates a new Balance instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.Balance - * @static - * @param {cosmos.bank.v1beta1.IBalance=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.Balance} Balance instance - */ - Balance.create = function create(properties) { - return new Balance(properties); - }; - - /** - * Encodes the specified Balance message. Does not implicitly {@link cosmos.bank.v1beta1.Balance.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Balance - * @static - * @param {cosmos.bank.v1beta1.IBalance} message Balance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Balance.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.coins != null && message.coins.length) - for (let i = 0; i < message.coins.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Balance message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Balance.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Balance - * @static - * @param {cosmos.bank.v1beta1.IBalance} message Balance message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Balance.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Balance message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Balance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Balance} Balance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Balance.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Balance(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - if (!(message.coins && message.coins.length)) - message.coins = []; - message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Balance message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Balance - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Balance} Balance - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Balance.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Balance message. - * @function verify - * @memberof cosmos.bank.v1beta1.Balance - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Balance.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.coins != null && message.hasOwnProperty("coins")) { - if (!Array.isArray(message.coins)) - return "coins: array expected"; - for (let i = 0; i < message.coins.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); - if (error) - return "coins." + error; - } - } - return null; - }; - - /** - * Creates a Balance message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Balance - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Balance} Balance - */ - Balance.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Balance) - return object; - let message = new $root.cosmos.bank.v1beta1.Balance(); - if (object.address != null) - message.address = String(object.address); - if (object.coins) { - if (!Array.isArray(object.coins)) - throw TypeError(".cosmos.bank.v1beta1.Balance.coins: array expected"); - message.coins = []; - for (let i = 0; i < object.coins.length; ++i) { - if (typeof object.coins[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Balance.coins: object expected"); - message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Balance message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Balance - * @static - * @param {cosmos.bank.v1beta1.Balance} message Balance - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Balance.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.coins = []; - if (options.defaults) - object.address = ""; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.coins && message.coins.length) { - object.coins = []; - for (let j = 0; j < message.coins.length; ++j) - object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); - } - return object; - }; - - /** - * Converts this Balance to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Balance - * @instance - * @returns {Object.} JSON object - */ - Balance.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Balance; - })(v1beta1.Balance || {}); - - v1beta1.Query = (function(Query) { - - /** - * Constructs a new Query service. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Query - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Query(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; - - /** - * Creates new Query service using the specified rpc implementation. - * @function create - * @memberof cosmos.bank.v1beta1.Query - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Query} RPC service. Useful where requests and/or responses are streamed. - */ - Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Query#balance}. - * @memberof cosmos.bank.v1beta1.Query - * @typedef BalanceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IQueryBalanceResponse} [response] QueryBalanceResponse - */ - - /** - * Calls Balance. - * @function balance - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryBalanceRequest} request QueryBalanceRequest message or plain object - * @param {cosmos.bank.v1beta1.Query.BalanceCallback} callback Node-style callback called with the error, if any, and QueryBalanceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.balance = function balance(request, callback) { - return this.rpcCall(balance, $root.cosmos.bank.v1beta1.QueryBalanceRequest, $root.cosmos.bank.v1beta1.QueryBalanceResponse, request, callback); - }, "name", { value: "Balance" }); - - /** - * Calls Balance. - * @function balance - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryBalanceRequest} request QueryBalanceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Query#allBalances}. - * @memberof cosmos.bank.v1beta1.Query - * @typedef AllBalancesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse} [response] QueryAllBalancesResponse - */ - - /** - * Calls AllBalances. - * @function allBalances - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest} request QueryAllBalancesRequest message or plain object - * @param {cosmos.bank.v1beta1.Query.AllBalancesCallback} callback Node-style callback called with the error, if any, and QueryAllBalancesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.allBalances = function allBalances(request, callback) { - return this.rpcCall(allBalances, $root.cosmos.bank.v1beta1.QueryAllBalancesRequest, $root.cosmos.bank.v1beta1.QueryAllBalancesResponse, request, callback); - }, "name", { value: "AllBalances" }); - - /** - * Calls AllBalances. - * @function allBalances - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest} request QueryAllBalancesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Query#totalSupply}. - * @memberof cosmos.bank.v1beta1.Query - * @typedef TotalSupplyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse} [response] QueryTotalSupplyResponse - */ - - /** - * Calls TotalSupply. - * @function totalSupply - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest} request QueryTotalSupplyRequest message or plain object - * @param {cosmos.bank.v1beta1.Query.TotalSupplyCallback} callback Node-style callback called with the error, if any, and QueryTotalSupplyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalSupply = function totalSupply(request, callback) { - return this.rpcCall(totalSupply, $root.cosmos.bank.v1beta1.QueryTotalSupplyRequest, $root.cosmos.bank.v1beta1.QueryTotalSupplyResponse, request, callback); - }, "name", { value: "TotalSupply" }); - - /** - * Calls TotalSupply. - * @function totalSupply - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest} request QueryTotalSupplyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Query#supplyOf}. - * @memberof cosmos.bank.v1beta1.Query - * @typedef SupplyOfCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse} [response] QuerySupplyOfResponse - */ - - /** - * Calls SupplyOf. - * @function supplyOf - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest} request QuerySupplyOfRequest message or plain object - * @param {cosmos.bank.v1beta1.Query.SupplyOfCallback} callback Node-style callback called with the error, if any, and QuerySupplyOfResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.supplyOf = function supplyOf(request, callback) { - return this.rpcCall(supplyOf, $root.cosmos.bank.v1beta1.QuerySupplyOfRequest, $root.cosmos.bank.v1beta1.QuerySupplyOfResponse, request, callback); - }, "name", { value: "SupplyOf" }); - - /** - * Calls SupplyOf. - * @function supplyOf - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest} request QuerySupplyOfRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Query#params}. - * @memberof cosmos.bank.v1beta1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {cosmos.bank.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.cosmos.bank.v1beta1.QueryParamsRequest, $root.cosmos.bank.v1beta1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Query#denomMetadata}. - * @memberof cosmos.bank.v1beta1.Query - * @typedef DenomMetadataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse} [response] QueryDenomMetadataResponse - */ - - /** - * Calls DenomMetadata. - * @function denomMetadata - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest} request QueryDenomMetadataRequest message or plain object - * @param {cosmos.bank.v1beta1.Query.DenomMetadataCallback} callback Node-style callback called with the error, if any, and QueryDenomMetadataResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomMetadata = function denomMetadata(request, callback) { - return this.rpcCall(denomMetadata, $root.cosmos.bank.v1beta1.QueryDenomMetadataRequest, $root.cosmos.bank.v1beta1.QueryDenomMetadataResponse, request, callback); - }, "name", { value: "DenomMetadata" }); - - /** - * Calls DenomMetadata. - * @function denomMetadata - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest} request QueryDenomMetadataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Query#denomsMetadata}. - * @memberof cosmos.bank.v1beta1.Query - * @typedef DenomsMetadataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse} [response] QueryDenomsMetadataResponse - */ - - /** - * Calls DenomsMetadata. - * @function denomsMetadata - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest} request QueryDenomsMetadataRequest message or plain object - * @param {cosmos.bank.v1beta1.Query.DenomsMetadataCallback} callback Node-style callback called with the error, if any, and QueryDenomsMetadataResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomsMetadata = function denomsMetadata(request, callback) { - return this.rpcCall(denomsMetadata, $root.cosmos.bank.v1beta1.QueryDenomsMetadataRequest, $root.cosmos.bank.v1beta1.QueryDenomsMetadataResponse, request, callback); - }, "name", { value: "DenomsMetadata" }); - - /** - * Calls DenomsMetadata. - * @function denomsMetadata - * @memberof cosmos.bank.v1beta1.Query - * @instance - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest} request QueryDenomsMetadataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(v1beta1.Query || {}); - - v1beta1.QueryBalanceRequest = (function(QueryBalanceRequest) { - - /** - * Properties of a QueryBalanceRequest. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryBalanceRequest - * @property {string|null} [address] QueryBalanceRequest address - * @property {string|null} [denom] QueryBalanceRequest denom - */ - - /** - * Constructs a new QueryBalanceRequest. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryBalanceRequest. - * @implements IQueryBalanceRequest - * @constructor - * @param {cosmos.bank.v1beta1.IQueryBalanceRequest=} [properties] Properties to set - */ - function QueryBalanceRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryBalanceRequest address. - * @member {string} address - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @instance - */ - QueryBalanceRequest.prototype.address = ""; - - /** - * QueryBalanceRequest denom. - * @member {string} denom - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @instance - */ - QueryBalanceRequest.prototype.denom = ""; - - /** - * Creates a new QueryBalanceRequest instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryBalanceRequest=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryBalanceRequest} QueryBalanceRequest instance - */ - QueryBalanceRequest.create = function create(properties) { - return new QueryBalanceRequest(properties); - }; - - /** - * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryBalanceRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryBalanceRequest} message QueryBalanceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBalanceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.denom); - return writer; - }; - - /** - * Encodes the specified QueryBalanceRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryBalanceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryBalanceRequest} message QueryBalanceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBalanceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryBalanceRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryBalanceRequest} QueryBalanceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBalanceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryBalanceRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryBalanceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryBalanceRequest} QueryBalanceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBalanceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryBalanceRequest message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryBalanceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - return null; - }; - - /** - * Creates a QueryBalanceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryBalanceRequest} QueryBalanceRequest - */ - QueryBalanceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryBalanceRequest) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryBalanceRequest(); - if (object.address != null) - message.address = String(object.address); - if (object.denom != null) - message.denom = String(object.denom); - return message; - }; - - /** - * Creates a plain object from a QueryBalanceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @static - * @param {cosmos.bank.v1beta1.QueryBalanceRequest} message QueryBalanceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryBalanceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.address = ""; - object.denom = ""; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - return object; - }; - - /** - * Converts this QueryBalanceRequest to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryBalanceRequest - * @instance - * @returns {Object.} JSON object - */ - QueryBalanceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryBalanceRequest; - })(v1beta1.QueryBalanceRequest || {}); - - v1beta1.QueryBalanceResponse = (function(QueryBalanceResponse) { - - /** - * Properties of a QueryBalanceResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryBalanceResponse - * @property {cosmos.base.v1beta1.ICoin|null} [balance] QueryBalanceResponse balance - */ - - /** - * Constructs a new QueryBalanceResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryBalanceResponse. - * @implements IQueryBalanceResponse - * @constructor - * @param {cosmos.bank.v1beta1.IQueryBalanceResponse=} [properties] Properties to set - */ - function QueryBalanceResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryBalanceResponse balance. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} balance - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @instance - */ - QueryBalanceResponse.prototype.balance = null; - - /** - * Creates a new QueryBalanceResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryBalanceResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryBalanceResponse} QueryBalanceResponse instance - */ - QueryBalanceResponse.create = function create(properties) { - return new QueryBalanceResponse(properties); - }; - - /** - * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryBalanceResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryBalanceResponse} message QueryBalanceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBalanceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) - $root.cosmos.base.v1beta1.Coin.encode(message.balance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryBalanceResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryBalanceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryBalanceResponse} message QueryBalanceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBalanceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryBalanceResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryBalanceResponse} QueryBalanceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBalanceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryBalanceResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.balance = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryBalanceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryBalanceResponse} QueryBalanceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBalanceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryBalanceResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryBalanceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.balance != null && message.hasOwnProperty("balance")) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.balance); - if (error) - return "balance." + error; - } - return null; - }; - - /** - * Creates a QueryBalanceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryBalanceResponse} QueryBalanceResponse - */ - QueryBalanceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryBalanceResponse) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryBalanceResponse(); - if (object.balance != null) { - if (typeof object.balance !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryBalanceResponse.balance: object expected"); - message.balance = $root.cosmos.base.v1beta1.Coin.fromObject(object.balance); - } - return message; - }; - - /** - * Creates a plain object from a QueryBalanceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @static - * @param {cosmos.bank.v1beta1.QueryBalanceResponse} message QueryBalanceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryBalanceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.balance = null; - if (message.balance != null && message.hasOwnProperty("balance")) - object.balance = $root.cosmos.base.v1beta1.Coin.toObject(message.balance, options); - return object; - }; - - /** - * Converts this QueryBalanceResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryBalanceResponse - * @instance - * @returns {Object.} JSON object - */ - QueryBalanceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryBalanceResponse; - })(v1beta1.QueryBalanceResponse || {}); - - v1beta1.QueryAllBalancesRequest = (function(QueryAllBalancesRequest) { - - /** - * Properties of a QueryAllBalancesRequest. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryAllBalancesRequest - * @property {string|null} [address] QueryAllBalancesRequest address - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryAllBalancesRequest pagination - */ - - /** - * Constructs a new QueryAllBalancesRequest. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryAllBalancesRequest. - * @implements IQueryAllBalancesRequest - * @constructor - * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest=} [properties] Properties to set - */ - function QueryAllBalancesRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAllBalancesRequest address. - * @member {string} address - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @instance - */ - QueryAllBalancesRequest.prototype.address = ""; - - /** - * QueryAllBalancesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @instance - */ - QueryAllBalancesRequest.prototype.pagination = null; - - /** - * Creates a new QueryAllBalancesRequest instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryAllBalancesRequest} QueryAllBalancesRequest instance - */ - QueryAllBalancesRequest.create = function create(properties) { - return new QueryAllBalancesRequest(properties); - }; - - /** - * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryAllBalancesRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest} message QueryAllBalancesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAllBalancesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryAllBalancesRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryAllBalancesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest} message QueryAllBalancesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAllBalancesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryAllBalancesRequest} QueryAllBalancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAllBalancesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryAllBalancesRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAllBalancesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryAllBalancesRequest} QueryAllBalancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAllBalancesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAllBalancesRequest message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAllBalancesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryAllBalancesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryAllBalancesRequest} QueryAllBalancesRequest - */ - QueryAllBalancesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryAllBalancesRequest) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryAllBalancesRequest(); - if (object.address != null) - message.address = String(object.address); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryAllBalancesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @static - * @param {cosmos.bank.v1beta1.QueryAllBalancesRequest} message QueryAllBalancesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAllBalancesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.address = ""; - object.pagination = null; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryAllBalancesRequest to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAllBalancesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAllBalancesRequest; - })(v1beta1.QueryAllBalancesRequest || {}); - - v1beta1.QueryAllBalancesResponse = (function(QueryAllBalancesResponse) { - - /** - * Properties of a QueryAllBalancesResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryAllBalancesResponse - * @property {Array.|null} [balances] QueryAllBalancesResponse balances - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryAllBalancesResponse pagination - */ - - /** - * Constructs a new QueryAllBalancesResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryAllBalancesResponse. - * @implements IQueryAllBalancesResponse - * @constructor - * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse=} [properties] Properties to set - */ - function QueryAllBalancesResponse(properties) { - this.balances = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAllBalancesResponse balances. - * @member {Array.} balances - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @instance - */ - QueryAllBalancesResponse.prototype.balances = $util.emptyArray; - - /** - * QueryAllBalancesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @instance - */ - QueryAllBalancesResponse.prototype.pagination = null; - - /** - * Creates a new QueryAllBalancesResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryAllBalancesResponse} QueryAllBalancesResponse instance - */ - QueryAllBalancesResponse.create = function create(properties) { - return new QueryAllBalancesResponse(properties); - }; - - /** - * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryAllBalancesResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse} message QueryAllBalancesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAllBalancesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.balances != null && message.balances.length) - for (let i = 0; i < message.balances.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.balances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryAllBalancesResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryAllBalancesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse} message QueryAllBalancesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAllBalancesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryAllBalancesResponse} QueryAllBalancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAllBalancesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryAllBalancesResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.balances && message.balances.length)) - message.balances = []; - message.balances.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAllBalancesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryAllBalancesResponse} QueryAllBalancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAllBalancesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAllBalancesResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAllBalancesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.balances != null && message.hasOwnProperty("balances")) { - if (!Array.isArray(message.balances)) - return "balances: array expected"; - for (let i = 0; i < message.balances.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.balances[i]); - if (error) - return "balances." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryAllBalancesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryAllBalancesResponse} QueryAllBalancesResponse - */ - QueryAllBalancesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryAllBalancesResponse) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryAllBalancesResponse(); - if (object.balances) { - if (!Array.isArray(object.balances)) - throw TypeError(".cosmos.bank.v1beta1.QueryAllBalancesResponse.balances: array expected"); - message.balances = []; - for (let i = 0; i < object.balances.length; ++i) { - if (typeof object.balances[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryAllBalancesResponse.balances: object expected"); - message.balances[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.balances[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryAllBalancesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @static - * @param {cosmos.bank.v1beta1.QueryAllBalancesResponse} message QueryAllBalancesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAllBalancesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.balances = []; - if (options.defaults) - object.pagination = null; - if (message.balances && message.balances.length) { - object.balances = []; - for (let j = 0; j < message.balances.length; ++j) - object.balances[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.balances[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryAllBalancesResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAllBalancesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAllBalancesResponse; - })(v1beta1.QueryAllBalancesResponse || {}); - - v1beta1.QueryTotalSupplyRequest = (function(QueryTotalSupplyRequest) { - - /** - * Properties of a QueryTotalSupplyRequest. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryTotalSupplyRequest - */ - - /** - * Constructs a new QueryTotalSupplyRequest. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryTotalSupplyRequest. - * @implements IQueryTotalSupplyRequest - * @constructor - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest=} [properties] Properties to set - */ - function QueryTotalSupplyRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new QueryTotalSupplyRequest instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryTotalSupplyRequest} QueryTotalSupplyRequest instance - */ - QueryTotalSupplyRequest.create = function create(properties) { - return new QueryTotalSupplyRequest(properties); - }; - - /** - * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryTotalSupplyRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest} message QueryTotalSupplyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalSupplyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryTotalSupplyRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryTotalSupplyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest} message QueryTotalSupplyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalSupplyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryTotalSupplyRequest} QueryTotalSupplyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalSupplyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryTotalSupplyRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryTotalSupplyRequest} QueryTotalSupplyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalSupplyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalSupplyRequest message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalSupplyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryTotalSupplyRequest} QueryTotalSupplyRequest - */ - QueryTotalSupplyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryTotalSupplyRequest) - return object; - return new $root.cosmos.bank.v1beta1.QueryTotalSupplyRequest(); - }; - - /** - * Creates a plain object from a QueryTotalSupplyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @static - * @param {cosmos.bank.v1beta1.QueryTotalSupplyRequest} message QueryTotalSupplyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalSupplyRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryTotalSupplyRequest to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalSupplyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalSupplyRequest; - })(v1beta1.QueryTotalSupplyRequest || {}); - - v1beta1.QueryTotalSupplyResponse = (function(QueryTotalSupplyResponse) { - - /** - * Properties of a QueryTotalSupplyResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryTotalSupplyResponse - * @property {Array.|null} [supply] QueryTotalSupplyResponse supply - */ - - /** - * Constructs a new QueryTotalSupplyResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryTotalSupplyResponse. - * @implements IQueryTotalSupplyResponse - * @constructor - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse=} [properties] Properties to set - */ - function QueryTotalSupplyResponse(properties) { - this.supply = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalSupplyResponse supply. - * @member {Array.} supply - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @instance - */ - QueryTotalSupplyResponse.prototype.supply = $util.emptyArray; - - /** - * Creates a new QueryTotalSupplyResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryTotalSupplyResponse} QueryTotalSupplyResponse instance - */ - QueryTotalSupplyResponse.create = function create(properties) { - return new QueryTotalSupplyResponse(properties); - }; - - /** - * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryTotalSupplyResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse} message QueryTotalSupplyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalSupplyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.supply != null && message.supply.length) - for (let i = 0; i < message.supply.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.supply[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalSupplyResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryTotalSupplyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse} message QueryTotalSupplyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalSupplyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryTotalSupplyResponse} QueryTotalSupplyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalSupplyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryTotalSupplyResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.supply && message.supply.length)) - message.supply = []; - message.supply.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryTotalSupplyResponse} QueryTotalSupplyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalSupplyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalSupplyResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalSupplyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.supply != null && message.hasOwnProperty("supply")) { - if (!Array.isArray(message.supply)) - return "supply: array expected"; - for (let i = 0; i < message.supply.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.supply[i]); - if (error) - return "supply." + error; - } - } - return null; - }; - - /** - * Creates a QueryTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryTotalSupplyResponse} QueryTotalSupplyResponse - */ - QueryTotalSupplyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryTotalSupplyResponse) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryTotalSupplyResponse(); - if (object.supply) { - if (!Array.isArray(object.supply)) - throw TypeError(".cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply: array expected"); - message.supply = []; - for (let i = 0; i < object.supply.length; ++i) { - if (typeof object.supply[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply: object expected"); - message.supply[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.supply[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalSupplyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @static - * @param {cosmos.bank.v1beta1.QueryTotalSupplyResponse} message QueryTotalSupplyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalSupplyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.supply = []; - if (message.supply && message.supply.length) { - object.supply = []; - for (let j = 0; j < message.supply.length; ++j) - object.supply[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.supply[j], options); - } - return object; - }; - - /** - * Converts this QueryTotalSupplyResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalSupplyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalSupplyResponse; - })(v1beta1.QueryTotalSupplyResponse || {}); - - v1beta1.QuerySupplyOfRequest = (function(QuerySupplyOfRequest) { - - /** - * Properties of a QuerySupplyOfRequest. - * @memberof cosmos.bank.v1beta1 - * @interface IQuerySupplyOfRequest - * @property {string|null} [denom] QuerySupplyOfRequest denom - */ - - /** - * Constructs a new QuerySupplyOfRequest. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QuerySupplyOfRequest. - * @implements IQuerySupplyOfRequest - * @constructor - * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest=} [properties] Properties to set - */ - function QuerySupplyOfRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QuerySupplyOfRequest denom. - * @member {string} denom - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @instance - */ - QuerySupplyOfRequest.prototype.denom = ""; - - /** - * Creates a new QuerySupplyOfRequest instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @static - * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QuerySupplyOfRequest} QuerySupplyOfRequest instance - */ - QuerySupplyOfRequest.create = function create(properties) { - return new QuerySupplyOfRequest(properties); - }; - - /** - * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QuerySupplyOfRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @static - * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest} message QuerySupplyOfRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySupplyOfRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - return writer; - }; - - /** - * Encodes the specified QuerySupplyOfRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QuerySupplyOfRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @static - * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest} message QuerySupplyOfRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySupplyOfRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QuerySupplyOfRequest} QuerySupplyOfRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySupplyOfRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QuerySupplyOfRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuerySupplyOfRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QuerySupplyOfRequest} QuerySupplyOfRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySupplyOfRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuerySupplyOfRequest message. - * @function verify - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuerySupplyOfRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - return null; - }; - - /** - * Creates a QuerySupplyOfRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QuerySupplyOfRequest} QuerySupplyOfRequest - */ - QuerySupplyOfRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QuerySupplyOfRequest) - return object; - let message = new $root.cosmos.bank.v1beta1.QuerySupplyOfRequest(); - if (object.denom != null) - message.denom = String(object.denom); - return message; - }; - - /** - * Creates a plain object from a QuerySupplyOfRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @static - * @param {cosmos.bank.v1beta1.QuerySupplyOfRequest} message QuerySupplyOfRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuerySupplyOfRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.denom = ""; - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - return object; - }; - - /** - * Converts this QuerySupplyOfRequest to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest - * @instance - * @returns {Object.} JSON object - */ - QuerySupplyOfRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QuerySupplyOfRequest; - })(v1beta1.QuerySupplyOfRequest || {}); - - v1beta1.QuerySupplyOfResponse = (function(QuerySupplyOfResponse) { - - /** - * Properties of a QuerySupplyOfResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IQuerySupplyOfResponse - * @property {cosmos.base.v1beta1.ICoin|null} [amount] QuerySupplyOfResponse amount - */ - - /** - * Constructs a new QuerySupplyOfResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QuerySupplyOfResponse. - * @implements IQuerySupplyOfResponse - * @constructor - * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse=} [properties] Properties to set - */ - function QuerySupplyOfResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QuerySupplyOfResponse amount. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @instance - */ - QuerySupplyOfResponse.prototype.amount = null; - - /** - * Creates a new QuerySupplyOfResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @static - * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QuerySupplyOfResponse} QuerySupplyOfResponse instance - */ - QuerySupplyOfResponse.create = function create(properties) { - return new QuerySupplyOfResponse(properties); - }; - - /** - * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QuerySupplyOfResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @static - * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse} message QuerySupplyOfResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySupplyOfResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QuerySupplyOfResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QuerySupplyOfResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @static - * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse} message QuerySupplyOfResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySupplyOfResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QuerySupplyOfResponse} QuerySupplyOfResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySupplyOfResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QuerySupplyOfResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuerySupplyOfResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QuerySupplyOfResponse} QuerySupplyOfResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySupplyOfResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuerySupplyOfResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuerySupplyOfResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - return null; - }; - - /** - * Creates a QuerySupplyOfResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QuerySupplyOfResponse} QuerySupplyOfResponse - */ - QuerySupplyOfResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QuerySupplyOfResponse) - return object; - let message = new $root.cosmos.bank.v1beta1.QuerySupplyOfResponse(); - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".cosmos.bank.v1beta1.QuerySupplyOfResponse.amount: object expected"); - message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); - } - return message; - }; - - /** - * Creates a plain object from a QuerySupplyOfResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @static - * @param {cosmos.bank.v1beta1.QuerySupplyOfResponse} message QuerySupplyOfResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuerySupplyOfResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.amount = null; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); - return object; - }; - - /** - * Converts this QuerySupplyOfResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse - * @instance - * @returns {Object.} JSON object - */ - QuerySupplyOfResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QuerySupplyOfResponse; - })(v1beta1.QuerySupplyOfResponse || {}); - - v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { - - /** - * Properties of a QueryParamsRequest. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {cosmos.bank.v1beta1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new QueryParamsRequest instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryParamsRequest=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryParamsRequest} QueryParamsRequest instance - */ - QueryParamsRequest.create = function create(properties) { - return new QueryParamsRequest(properties); - }; - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryParamsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryParamsRequest) - return object; - return new $root.cosmos.bank.v1beta1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @static - * @param {cosmos.bank.v1beta1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(v1beta1.QueryParamsRequest || {}); - - v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { - - /** - * Properties of a QueryParamsResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryParamsResponse - * @property {cosmos.bank.v1beta1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {cosmos.bank.v1beta1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {cosmos.bank.v1beta1.IParams|null|undefined} params - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Creates a new QueryParamsResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryParamsResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryParamsResponse} QueryParamsResponse instance - */ - QueryParamsResponse.create = function create(properties) { - return new QueryParamsResponse(properties); - }; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.cosmos.bank.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.cosmos.bank.v1beta1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.cosmos.bank.v1beta1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryParamsResponse) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryParamsResponse.params: object expected"); - message.params = $root.cosmos.bank.v1beta1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @static - * @param {cosmos.bank.v1beta1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.cosmos.bank.v1beta1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(v1beta1.QueryParamsResponse || {}); - - v1beta1.QueryDenomsMetadataRequest = (function(QueryDenomsMetadataRequest) { - - /** - * Properties of a QueryDenomsMetadataRequest. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryDenomsMetadataRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDenomsMetadataRequest pagination - */ - - /** - * Constructs a new QueryDenomsMetadataRequest. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryDenomsMetadataRequest. - * @implements IQueryDenomsMetadataRequest - * @constructor - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest=} [properties] Properties to set - */ - function QueryDenomsMetadataRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomsMetadataRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @instance - */ - QueryDenomsMetadataRequest.prototype.pagination = null; - - /** - * Creates a new QueryDenomsMetadataRequest instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} QueryDenomsMetadataRequest instance - */ - QueryDenomsMetadataRequest.create = function create(properties) { - return new QueryDenomsMetadataRequest(properties); - }; - - /** - * Encodes the specified QueryDenomsMetadataRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomsMetadataRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest} message QueryDenomsMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomsMetadataRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomsMetadataRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomsMetadataRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest} message QueryDenomsMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomsMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomsMetadataRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} QueryDenomsMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomsMetadataRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryDenomsMetadataRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomsMetadataRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} QueryDenomsMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomsMetadataRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomsMetadataRequest message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomsMetadataRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryDenomsMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} QueryDenomsMetadataRequest - */ - QueryDenomsMetadataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryDenomsMetadataRequest) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryDenomsMetadataRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomsMetadataRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @static - * @param {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} message QueryDenomsMetadataRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomsMetadataRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryDenomsMetadataRequest to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomsMetadataRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomsMetadataRequest; - })(v1beta1.QueryDenomsMetadataRequest || {}); - - v1beta1.QueryDenomsMetadataResponse = (function(QueryDenomsMetadataResponse) { - - /** - * Properties of a QueryDenomsMetadataResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryDenomsMetadataResponse - * @property {Array.|null} [metadatas] QueryDenomsMetadataResponse metadatas - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDenomsMetadataResponse pagination - */ - - /** - * Constructs a new QueryDenomsMetadataResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryDenomsMetadataResponse. - * @implements IQueryDenomsMetadataResponse - * @constructor - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse=} [properties] Properties to set - */ - function QueryDenomsMetadataResponse(properties) { - this.metadatas = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomsMetadataResponse metadatas. - * @member {Array.} metadatas - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @instance - */ - QueryDenomsMetadataResponse.prototype.metadatas = $util.emptyArray; - - /** - * QueryDenomsMetadataResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @instance - */ - QueryDenomsMetadataResponse.prototype.pagination = null; - - /** - * Creates a new QueryDenomsMetadataResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} QueryDenomsMetadataResponse instance - */ - QueryDenomsMetadataResponse.create = function create(properties) { - return new QueryDenomsMetadataResponse(properties); - }; - - /** - * Encodes the specified QueryDenomsMetadataResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomsMetadataResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse} message QueryDenomsMetadataResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomsMetadataResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadatas != null && message.metadatas.length) - for (let i = 0; i < message.metadatas.length; ++i) - $root.cosmos.bank.v1beta1.Metadata.encode(message.metadatas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomsMetadataResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomsMetadataResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse} message QueryDenomsMetadataResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomsMetadataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomsMetadataResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} QueryDenomsMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomsMetadataResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryDenomsMetadataResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.metadatas && message.metadatas.length)) - message.metadatas = []; - message.metadatas.push($root.cosmos.bank.v1beta1.Metadata.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomsMetadataResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} QueryDenomsMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomsMetadataResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomsMetadataResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomsMetadataResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadatas != null && message.hasOwnProperty("metadatas")) { - if (!Array.isArray(message.metadatas)) - return "metadatas: array expected"; - for (let i = 0; i < message.metadatas.length; ++i) { - let error = $root.cosmos.bank.v1beta1.Metadata.verify(message.metadatas[i]); - if (error) - return "metadatas." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryDenomsMetadataResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} QueryDenomsMetadataResponse - */ - QueryDenomsMetadataResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryDenomsMetadataResponse) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryDenomsMetadataResponse(); - if (object.metadatas) { - if (!Array.isArray(object.metadatas)) - throw TypeError(".cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas: array expected"); - message.metadatas = []; - for (let i = 0; i < object.metadatas.length; ++i) { - if (typeof object.metadatas[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas: object expected"); - message.metadatas[i] = $root.cosmos.bank.v1beta1.Metadata.fromObject(object.metadatas[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomsMetadataResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @static - * @param {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} message QueryDenomsMetadataResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomsMetadataResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.metadatas = []; - if (options.defaults) - object.pagination = null; - if (message.metadatas && message.metadatas.length) { - object.metadatas = []; - for (let j = 0; j < message.metadatas.length; ++j) - object.metadatas[j] = $root.cosmos.bank.v1beta1.Metadata.toObject(message.metadatas[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryDenomsMetadataResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomsMetadataResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomsMetadataResponse; - })(v1beta1.QueryDenomsMetadataResponse || {}); - - v1beta1.QueryDenomMetadataRequest = (function(QueryDenomMetadataRequest) { - - /** - * Properties of a QueryDenomMetadataRequest. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryDenomMetadataRequest - * @property {string|null} [denom] QueryDenomMetadataRequest denom - */ - - /** - * Constructs a new QueryDenomMetadataRequest. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryDenomMetadataRequest. - * @implements IQueryDenomMetadataRequest - * @constructor - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest=} [properties] Properties to set - */ - function QueryDenomMetadataRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomMetadataRequest denom. - * @member {string} denom - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @instance - */ - QueryDenomMetadataRequest.prototype.denom = ""; - - /** - * Creates a new QueryDenomMetadataRequest instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryDenomMetadataRequest} QueryDenomMetadataRequest instance - */ - QueryDenomMetadataRequest.create = function create(properties) { - return new QueryDenomMetadataRequest(properties); - }; - - /** - * Encodes the specified QueryDenomMetadataRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomMetadataRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest} message QueryDenomMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomMetadataRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - return writer; - }; - - /** - * Encodes the specified QueryDenomMetadataRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomMetadataRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest} message QueryDenomMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomMetadataRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryDenomMetadataRequest} QueryDenomMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomMetadataRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryDenomMetadataRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomMetadataRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryDenomMetadataRequest} QueryDenomMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomMetadataRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomMetadataRequest message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomMetadataRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - return null; - }; - - /** - * Creates a QueryDenomMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryDenomMetadataRequest} QueryDenomMetadataRequest - */ - QueryDenomMetadataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryDenomMetadataRequest) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryDenomMetadataRequest(); - if (object.denom != null) - message.denom = String(object.denom); - return message; - }; - - /** - * Creates a plain object from a QueryDenomMetadataRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @static - * @param {cosmos.bank.v1beta1.QueryDenomMetadataRequest} message QueryDenomMetadataRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomMetadataRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.denom = ""; - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - return object; - }; - - /** - * Converts this QueryDenomMetadataRequest to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomMetadataRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomMetadataRequest; - })(v1beta1.QueryDenomMetadataRequest || {}); - - v1beta1.QueryDenomMetadataResponse = (function(QueryDenomMetadataResponse) { - - /** - * Properties of a QueryDenomMetadataResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IQueryDenomMetadataResponse - * @property {cosmos.bank.v1beta1.IMetadata|null} [metadata] QueryDenomMetadataResponse metadata - */ - - /** - * Constructs a new QueryDenomMetadataResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a QueryDenomMetadataResponse. - * @implements IQueryDenomMetadataResponse - * @constructor - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse=} [properties] Properties to set - */ - function QueryDenomMetadataResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomMetadataResponse metadata. - * @member {cosmos.bank.v1beta1.IMetadata|null|undefined} metadata - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @instance - */ - QueryDenomMetadataResponse.prototype.metadata = null; - - /** - * Creates a new QueryDenomMetadataResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.QueryDenomMetadataResponse} QueryDenomMetadataResponse instance - */ - QueryDenomMetadataResponse.create = function create(properties) { - return new QueryDenomMetadataResponse(properties); - }; - - /** - * Encodes the specified QueryDenomMetadataResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomMetadataResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse} message QueryDenomMetadataResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomMetadataResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.cosmos.bank.v1beta1.Metadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomMetadataResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomMetadataResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @static - * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse} message QueryDenomMetadataResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomMetadataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomMetadataResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.QueryDenomMetadataResponse} QueryDenomMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomMetadataResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryDenomMetadataResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.metadata = $root.cosmos.bank.v1beta1.Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomMetadataResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.QueryDenomMetadataResponse} QueryDenomMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomMetadataResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomMetadataResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomMetadataResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - let error = $root.cosmos.bank.v1beta1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; - - /** - * Creates a QueryDenomMetadataResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.QueryDenomMetadataResponse} QueryDenomMetadataResponse - */ - QueryDenomMetadataResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.QueryDenomMetadataResponse) - return object; - let message = new $root.cosmos.bank.v1beta1.QueryDenomMetadataResponse(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata: object expected"); - message.metadata = $root.cosmos.bank.v1beta1.Metadata.fromObject(object.metadata); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomMetadataResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @static - * @param {cosmos.bank.v1beta1.QueryDenomMetadataResponse} message QueryDenomMetadataResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomMetadataResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.metadata = null; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.cosmos.bank.v1beta1.Metadata.toObject(message.metadata, options); - return object; - }; - - /** - * Converts this QueryDenomMetadataResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomMetadataResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomMetadataResponse; - })(v1beta1.QueryDenomMetadataResponse || {}); - - v1beta1.Msg = (function(Msg) { - - /** - * Constructs a new Msg service. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Creates new Msg service using the specified rpc implementation. - * @function create - * @memberof cosmos.bank.v1beta1.Msg - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. - */ - Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Msg#send}. - * @memberof cosmos.bank.v1beta1.Msg - * @typedef SendCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IMsgSendResponse} [response] MsgSendResponse - */ - - /** - * Calls Send. - * @function send - * @memberof cosmos.bank.v1beta1.Msg - * @instance - * @param {cosmos.bank.v1beta1.IMsgSend} request MsgSend message or plain object - * @param {cosmos.bank.v1beta1.Msg.SendCallback} callback Node-style callback called with the error, if any, and MsgSendResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.send = function send(request, callback) { - return this.rpcCall(send, $root.cosmos.bank.v1beta1.MsgSend, $root.cosmos.bank.v1beta1.MsgSendResponse, request, callback); - }, "name", { value: "Send" }); - - /** - * Calls Send. - * @function send - * @memberof cosmos.bank.v1beta1.Msg - * @instance - * @param {cosmos.bank.v1beta1.IMsgSend} request MsgSend message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.bank.v1beta1.Msg#multiSend}. - * @memberof cosmos.bank.v1beta1.Msg - * @typedef MultiSendCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} [response] MsgMultiSendResponse - */ - - /** - * Calls MultiSend. - * @function multiSend - * @memberof cosmos.bank.v1beta1.Msg - * @instance - * @param {cosmos.bank.v1beta1.IMsgMultiSend} request MsgMultiSend message or plain object - * @param {cosmos.bank.v1beta1.Msg.MultiSendCallback} callback Node-style callback called with the error, if any, and MsgMultiSendResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.multiSend = function multiSend(request, callback) { - return this.rpcCall(multiSend, $root.cosmos.bank.v1beta1.MsgMultiSend, $root.cosmos.bank.v1beta1.MsgMultiSendResponse, request, callback); - }, "name", { value: "MultiSend" }); - - /** - * Calls MultiSend. - * @function multiSend - * @memberof cosmos.bank.v1beta1.Msg - * @instance - * @param {cosmos.bank.v1beta1.IMsgMultiSend} request MsgMultiSend message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(v1beta1.Msg || {}); - - v1beta1.MsgSend = (function(MsgSend) { - - /** - * Properties of a MsgSend. - * @memberof cosmos.bank.v1beta1 - * @interface IMsgSend - * @property {string|null} [fromAddress] MsgSend fromAddress - * @property {string|null} [toAddress] MsgSend toAddress - * @property {Array.|null} [amount] MsgSend amount - */ - - /** - * Constructs a new MsgSend. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a MsgSend. - * @implements IMsgSend - * @constructor - * @param {cosmos.bank.v1beta1.IMsgSend=} [properties] Properties to set - */ - function MsgSend(properties) { - this.amount = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSend fromAddress. - * @member {string} fromAddress - * @memberof cosmos.bank.v1beta1.MsgSend - * @instance - */ - MsgSend.prototype.fromAddress = ""; - - /** - * MsgSend toAddress. - * @member {string} toAddress - * @memberof cosmos.bank.v1beta1.MsgSend - * @instance - */ - MsgSend.prototype.toAddress = ""; - - /** - * MsgSend amount. - * @member {Array.} amount - * @memberof cosmos.bank.v1beta1.MsgSend - * @instance - */ - MsgSend.prototype.amount = $util.emptyArray; - - /** - * Creates a new MsgSend instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.MsgSend - * @static - * @param {cosmos.bank.v1beta1.IMsgSend=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend instance - */ - MsgSend.create = function create(properties) { - return new MsgSend(properties); - }; - - /** - * Encodes the specified MsgSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.MsgSend - * @static - * @param {cosmos.bank.v1beta1.IMsgSend} message MsgSend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fromAddress); - if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.toAddress); - if (message.amount != null && message.amount.length) - for (let i = 0; i < message.amount.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.MsgSend - * @static - * @param {cosmos.bank.v1beta1.IMsgSend} message MsgSend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSend message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.MsgSend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSend.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgSend(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fromAddress = reader.string(); - break; - case 2: - message.toAddress = reader.string(); - break; - case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.MsgSend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSend message. - * @function verify - * @memberof cosmos.bank.v1beta1.MsgSend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) - if (!$util.isString(message.fromAddress)) - return "fromAddress: string expected"; - if (message.toAddress != null && message.hasOwnProperty("toAddress")) - if (!$util.isString(message.toAddress)) - return "toAddress: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (let i = 0; i < message.amount.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.MsgSend - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend - */ - MsgSend.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.MsgSend) - return object; - let message = new $root.cosmos.bank.v1beta1.MsgSend(); - if (object.fromAddress != null) - message.fromAddress = String(object.fromAddress); - if (object.toAddress != null) - message.toAddress = String(object.toAddress); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos.bank.v1beta1.MsgSend.amount: array expected"); - message.amount = []; - for (let i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.MsgSend.amount: object expected"); - message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MsgSend message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.MsgSend - * @static - * @param {cosmos.bank.v1beta1.MsgSend} message MsgSend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSend.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - object.fromAddress = ""; - object.toAddress = ""; - } - if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) - object.fromAddress = message.fromAddress; - if (message.toAddress != null && message.hasOwnProperty("toAddress")) - object.toAddress = message.toAddress; - if (message.amount && message.amount.length) { - object.amount = []; - for (let j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this MsgSend to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.MsgSend - * @instance - * @returns {Object.} JSON object - */ - MsgSend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSend; - })(v1beta1.MsgSend || {}); - - v1beta1.MsgSendResponse = (function(MsgSendResponse) { - - /** - * Properties of a MsgSendResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IMsgSendResponse - */ - - /** - * Constructs a new MsgSendResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a MsgSendResponse. - * @implements IMsgSendResponse - * @constructor - * @param {cosmos.bank.v1beta1.IMsgSendResponse=} [properties] Properties to set - */ - function MsgSendResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new MsgSendResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @static - * @param {cosmos.bank.v1beta1.IMsgSendResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse instance - */ - MsgSendResponse.create = function create(properties) { - return new MsgSendResponse(properties); - }; - - /** - * Encodes the specified MsgSendResponse message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSendResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @static - * @param {cosmos.bank.v1beta1.IMsgSendResponse} message MsgSendResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgSendResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgSendResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @static - * @param {cosmos.bank.v1beta1.IMsgSendResponse} message MsgSendResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSendResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgSendResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSendResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSendResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSendResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgSendResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse - */ - MsgSendResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.MsgSendResponse) - return object; - return new $root.cosmos.bank.v1beta1.MsgSendResponse(); - }; - - /** - * Creates a plain object from a MsgSendResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @static - * @param {cosmos.bank.v1beta1.MsgSendResponse} message MsgSendResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSendResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgSendResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.MsgSendResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSendResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSendResponse; - })(v1beta1.MsgSendResponse || {}); - - v1beta1.MsgMultiSend = (function(MsgMultiSend) { - - /** - * Properties of a MsgMultiSend. - * @memberof cosmos.bank.v1beta1 - * @interface IMsgMultiSend - * @property {Array.|null} [inputs] MsgMultiSend inputs - * @property {Array.|null} [outputs] MsgMultiSend outputs - */ - - /** - * Constructs a new MsgMultiSend. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a MsgMultiSend. - * @implements IMsgMultiSend - * @constructor - * @param {cosmos.bank.v1beta1.IMsgMultiSend=} [properties] Properties to set - */ - function MsgMultiSend(properties) { - this.inputs = []; - this.outputs = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgMultiSend inputs. - * @member {Array.} inputs - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @instance - */ - MsgMultiSend.prototype.inputs = $util.emptyArray; - - /** - * MsgMultiSend outputs. - * @member {Array.} outputs - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @instance - */ - MsgMultiSend.prototype.outputs = $util.emptyArray; - - /** - * Creates a new MsgMultiSend instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @static - * @param {cosmos.bank.v1beta1.IMsgMultiSend=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend instance - */ - MsgMultiSend.create = function create(properties) { - return new MsgMultiSend(properties); - }; - - /** - * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @static - * @param {cosmos.bank.v1beta1.IMsgMultiSend} message MsgMultiSend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMultiSend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputs != null && message.inputs.length) - for (let i = 0; i < message.inputs.length; ++i) - $root.cosmos.bank.v1beta1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.outputs != null && message.outputs.length) - for (let i = 0; i < message.outputs.length; ++i) - $root.cosmos.bank.v1beta1.Output.encode(message.outputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @static - * @param {cosmos.bank.v1beta1.IMsgMultiSend} message MsgMultiSend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMultiSend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMultiSend.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgMultiSend(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push($root.cosmos.bank.v1beta1.Input.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.outputs && message.outputs.length)) - message.outputs = []; - message.outputs.push($root.cosmos.bank.v1beta1.Output.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMultiSend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgMultiSend message. - * @function verify - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgMultiSend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputs != null && message.hasOwnProperty("inputs")) { - if (!Array.isArray(message.inputs)) - return "inputs: array expected"; - for (let i = 0; i < message.inputs.length; ++i) { - let error = $root.cosmos.bank.v1beta1.Input.verify(message.inputs[i]); - if (error) - return "inputs." + error; - } - } - if (message.outputs != null && message.hasOwnProperty("outputs")) { - if (!Array.isArray(message.outputs)) - return "outputs: array expected"; - for (let i = 0; i < message.outputs.length; ++i) { - let error = $root.cosmos.bank.v1beta1.Output.verify(message.outputs[i]); - if (error) - return "outputs." + error; - } - } - return null; - }; - - /** - * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend - */ - MsgMultiSend.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.MsgMultiSend) - return object; - let message = new $root.cosmos.bank.v1beta1.MsgMultiSend(); - if (object.inputs) { - if (!Array.isArray(object.inputs)) - throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.inputs: array expected"); - message.inputs = []; - for (let i = 0; i < object.inputs.length; ++i) { - if (typeof object.inputs[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.inputs: object expected"); - message.inputs[i] = $root.cosmos.bank.v1beta1.Input.fromObject(object.inputs[i]); - } - } - if (object.outputs) { - if (!Array.isArray(object.outputs)) - throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.outputs: array expected"); - message.outputs = []; - for (let i = 0; i < object.outputs.length; ++i) { - if (typeof object.outputs[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.outputs: object expected"); - message.outputs[i] = $root.cosmos.bank.v1beta1.Output.fromObject(object.outputs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @static - * @param {cosmos.bank.v1beta1.MsgMultiSend} message MsgMultiSend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgMultiSend.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.inputs = []; - object.outputs = []; - } - if (message.inputs && message.inputs.length) { - object.inputs = []; - for (let j = 0; j < message.inputs.length; ++j) - object.inputs[j] = $root.cosmos.bank.v1beta1.Input.toObject(message.inputs[j], options); - } - if (message.outputs && message.outputs.length) { - object.outputs = []; - for (let j = 0; j < message.outputs.length; ++j) - object.outputs[j] = $root.cosmos.bank.v1beta1.Output.toObject(message.outputs[j], options); - } - return object; - }; - - /** - * Converts this MsgMultiSend to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.MsgMultiSend - * @instance - * @returns {Object.} JSON object - */ - MsgMultiSend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgMultiSend; - })(v1beta1.MsgMultiSend || {}); - - v1beta1.MsgMultiSendResponse = (function(MsgMultiSendResponse) { - - /** - * Properties of a MsgMultiSendResponse. - * @memberof cosmos.bank.v1beta1 - * @interface IMsgMultiSendResponse - */ - - /** - * Constructs a new MsgMultiSendResponse. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a MsgMultiSendResponse. - * @implements IMsgMultiSendResponse - * @constructor - * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse=} [properties] Properties to set - */ - function MsgMultiSendResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new MsgMultiSendResponse instance using the specified properties. - * @function create - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @static - * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse=} [properties] Properties to set - * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse instance - */ - MsgMultiSendResponse.create = function create(properties) { - return new MsgMultiSendResponse(properties); - }; - - /** - * Encodes the specified MsgMultiSendResponse message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSendResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @static - * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} message MsgMultiSendResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMultiSendResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgMultiSendResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSendResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @static - * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} message MsgMultiSendResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMultiSendResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgMultiSendResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMultiSendResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgMultiSendResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgMultiSendResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMultiSendResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgMultiSendResponse message. - * @function verify - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgMultiSendResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgMultiSendResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse - */ - MsgMultiSendResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.MsgMultiSendResponse) - return object; - return new $root.cosmos.bank.v1beta1.MsgMultiSendResponse(); - }; - - /** - * Creates a plain object from a MsgMultiSendResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @static - * @param {cosmos.bank.v1beta1.MsgMultiSendResponse} message MsgMultiSendResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgMultiSendResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgMultiSendResponse to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse - * @instance - * @returns {Object.} JSON object - */ - MsgMultiSendResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgMultiSendResponse; - })(v1beta1.MsgMultiSendResponse || {}); - - return v1beta1; - })(bank.v1beta1 || {}); - - return bank; - })(cosmos.bank || {}); - - /** - * Namespace base. - * @memberof cosmos - * @namespace - */ - - cosmos.base = (function(base) { - - /** - * Namespace abci. - * @memberof cosmos.base - * @namespace - */ - - base.abci = (function(abci) { - - /** - * Namespace v1beta1. - * @memberof cosmos.base.abci - * @namespace - */ - - abci.v1beta1 = (function(v1beta1) { - - v1beta1.TxResponse = (function(TxResponse) { - - /** - * Properties of a TxResponse. - * @memberof cosmos.base.abci.v1beta1 - * @interface ITxResponse - * @property {number|Long|null} [height] TxResponse height - * @property {string|null} [txhash] TxResponse txhash - * @property {string|null} [codespace] TxResponse codespace - * @property {number|null} [code] TxResponse code - * @property {string|null} [data] TxResponse data - * @property {string|null} [rawLog] TxResponse rawLog - * @property {Array.|null} [logs] TxResponse logs - * @property {string|null} [info] TxResponse info - * @property {number|Long|null} [gasWanted] TxResponse gasWanted - * @property {number|Long|null} [gasUsed] TxResponse gasUsed - * @property {google.protobuf.IAny|null} [tx] TxResponse tx - * @property {string|null} [timestamp] TxResponse timestamp - */ - - /** - * Constructs a new TxResponse. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a TxResponse. - * @implements ITxResponse - * @constructor - * @param {cosmos.base.abci.v1beta1.ITxResponse=} [properties] Properties to set - */ - function TxResponse(properties) { - this.logs = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TxResponse height. - * @member {number|Long} height - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TxResponse txhash. - * @member {string} txhash - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.txhash = ""; - - /** - * TxResponse codespace. - * @member {string} codespace - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.codespace = ""; - - /** - * TxResponse code. - * @member {number} code - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.code = 0; - - /** - * TxResponse data. - * @member {string} data - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.data = ""; - - /** - * TxResponse rawLog. - * @member {string} rawLog - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.rawLog = ""; - - /** - * TxResponse logs. - * @member {Array.} logs - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.logs = $util.emptyArray; - - /** - * TxResponse info. - * @member {string} info - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.info = ""; - - /** - * TxResponse gasWanted. - * @member {number|Long} gasWanted - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TxResponse gasUsed. - * @member {number|Long} gasUsed - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TxResponse tx. - * @member {google.protobuf.IAny|null|undefined} tx - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.tx = null; - - /** - * TxResponse timestamp. - * @member {string} timestamp - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - */ - TxResponse.prototype.timestamp = ""; - - /** - * Creates a new TxResponse instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @static - * @param {cosmos.base.abci.v1beta1.ITxResponse=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.TxResponse} TxResponse instance - */ - TxResponse.create = function create(properties) { - return new TxResponse(properties); - }; - - /** - * Encodes the specified TxResponse message. Does not implicitly {@link cosmos.base.abci.v1beta1.TxResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @static - * @param {cosmos.base.abci.v1beta1.ITxResponse} message TxResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); - if (message.txhash != null && Object.hasOwnProperty.call(message, "txhash")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.txhash); - if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.codespace); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.code); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.data); - if (message.rawLog != null && Object.hasOwnProperty.call(message, "rawLog")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.rawLog); - if (message.logs != null && message.logs.length) - for (let i = 0; i < message.logs.length; ++i) - $root.cosmos.base.abci.v1beta1.ABCIMessageLog.encode(message.logs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.info); - if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.gasWanted); - if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.gasUsed); - if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) - $root.google.protobuf.Any.encode(message.tx, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.timestamp); - return writer; - }; - - /** - * Encodes the specified TxResponse message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.TxResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @static - * @param {cosmos.base.abci.v1beta1.ITxResponse} message TxResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TxResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.TxResponse} TxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.TxResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.txhash = reader.string(); - break; - case 3: - message.codespace = reader.string(); - break; - case 4: - message.code = reader.uint32(); - break; - case 5: - message.data = reader.string(); - break; - case 6: - message.rawLog = reader.string(); - break; - case 7: - if (!(message.logs && message.logs.length)) - message.logs = []; - message.logs.push($root.cosmos.base.abci.v1beta1.ABCIMessageLog.decode(reader, reader.uint32())); - break; - case 8: - message.info = reader.string(); - break; - case 9: - message.gasWanted = reader.int64(); - break; - case 10: - message.gasUsed = reader.int64(); - break; - case 11: - message.tx = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 12: - message.timestamp = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TxResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.TxResponse} TxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxResponse message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - if (message.txhash != null && message.hasOwnProperty("txhash")) - if (!$util.isString(message.txhash)) - return "txhash: string expected"; - if (message.codespace != null && message.hasOwnProperty("codespace")) - if (!$util.isString(message.codespace)) - return "codespace: string expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!$util.isString(message.data)) - return "data: string expected"; - if (message.rawLog != null && message.hasOwnProperty("rawLog")) - if (!$util.isString(message.rawLog)) - return "rawLog: string expected"; - if (message.logs != null && message.hasOwnProperty("logs")) { - if (!Array.isArray(message.logs)) - return "logs: array expected"; - for (let i = 0; i < message.logs.length; ++i) { - let error = $root.cosmos.base.abci.v1beta1.ABCIMessageLog.verify(message.logs[i]); - if (error) - return "logs." + error; - } - } - if (message.info != null && message.hasOwnProperty("info")) - if (!$util.isString(message.info)) - return "info: string expected"; - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) - return "gasWanted: integer|Long expected"; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) - return "gasUsed: integer|Long expected"; - if (message.tx != null && message.hasOwnProperty("tx")) { - let error = $root.google.protobuf.Any.verify(message.tx); - if (error) - return "tx." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isString(message.timestamp)) - return "timestamp: string expected"; - return null; - }; - - /** - * Creates a TxResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.TxResponse} TxResponse - */ - TxResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.TxResponse) - return object; - let message = new $root.cosmos.base.abci.v1beta1.TxResponse(); - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = false; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); - if (object.txhash != null) - message.txhash = String(object.txhash); - if (object.codespace != null) - message.codespace = String(object.codespace); - if (object.code != null) - message.code = object.code >>> 0; - if (object.data != null) - message.data = String(object.data); - if (object.rawLog != null) - message.rawLog = String(object.rawLog); - if (object.logs) { - if (!Array.isArray(object.logs)) - throw TypeError(".cosmos.base.abci.v1beta1.TxResponse.logs: array expected"); - message.logs = []; - for (let i = 0; i < object.logs.length; ++i) { - if (typeof object.logs[i] !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.TxResponse.logs: object expected"); - message.logs[i] = $root.cosmos.base.abci.v1beta1.ABCIMessageLog.fromObject(object.logs[i]); - } - } - if (object.info != null) - message.info = String(object.info); - if (object.gasWanted != null) - if ($util.Long) - (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; - else if (typeof object.gasWanted === "string") - message.gasWanted = parseInt(object.gasWanted, 10); - else if (typeof object.gasWanted === "number") - message.gasWanted = object.gasWanted; - else if (typeof object.gasWanted === "object") - message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); - if (object.gasUsed != null) - if ($util.Long) - (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; - else if (typeof object.gasUsed === "string") - message.gasUsed = parseInt(object.gasUsed, 10); - else if (typeof object.gasUsed === "number") - message.gasUsed = object.gasUsed; - else if (typeof object.gasUsed === "object") - message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); - if (object.tx != null) { - if (typeof object.tx !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.TxResponse.tx: object expected"); - message.tx = $root.google.protobuf.Any.fromObject(object.tx); - } - if (object.timestamp != null) - message.timestamp = String(object.timestamp); - return message; - }; - - /** - * Creates a plain object from a TxResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @static - * @param {cosmos.base.abci.v1beta1.TxResponse} message TxResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.logs = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.txhash = ""; - object.codespace = ""; - object.code = 0; - object.data = ""; - object.rawLog = ""; - object.info = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasWanted = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasUsed = options.longs === String ? "0" : 0; - object.tx = null; - object.timestamp = ""; - } - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; - if (message.txhash != null && message.hasOwnProperty("txhash")) - object.txhash = message.txhash; - if (message.codespace != null && message.hasOwnProperty("codespace")) - object.codespace = message.codespace; - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.data != null && message.hasOwnProperty("data")) - object.data = message.data; - if (message.rawLog != null && message.hasOwnProperty("rawLog")) - object.rawLog = message.rawLog; - if (message.logs && message.logs.length) { - object.logs = []; - for (let j = 0; j < message.logs.length; ++j) - object.logs[j] = $root.cosmos.base.abci.v1beta1.ABCIMessageLog.toObject(message.logs[j], options); - } - if (message.info != null && message.hasOwnProperty("info")) - object.info = message.info; - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (typeof message.gasWanted === "number") - object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; - else - object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (typeof message.gasUsed === "number") - object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; - else - object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; - if (message.tx != null && message.hasOwnProperty("tx")) - object.tx = $root.google.protobuf.Any.toObject(message.tx, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = message.timestamp; - return object; - }; - - /** - * Converts this TxResponse to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.TxResponse - * @instance - * @returns {Object.} JSON object - */ - TxResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TxResponse; - })(v1beta1.TxResponse || {}); - - v1beta1.ABCIMessageLog = (function(ABCIMessageLog) { - - /** - * Properties of a ABCIMessageLog. - * @memberof cosmos.base.abci.v1beta1 - * @interface IABCIMessageLog - * @property {number|null} [msgIndex] ABCIMessageLog msgIndex - * @property {string|null} [log] ABCIMessageLog log - * @property {Array.|null} [events] ABCIMessageLog events - */ - - /** - * Constructs a new ABCIMessageLog. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a ABCIMessageLog. - * @implements IABCIMessageLog - * @constructor - * @param {cosmos.base.abci.v1beta1.IABCIMessageLog=} [properties] Properties to set - */ - function ABCIMessageLog(properties) { - this.events = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ABCIMessageLog msgIndex. - * @member {number} msgIndex - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @instance - */ - ABCIMessageLog.prototype.msgIndex = 0; - - /** - * ABCIMessageLog log. - * @member {string} log - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @instance - */ - ABCIMessageLog.prototype.log = ""; - - /** - * ABCIMessageLog events. - * @member {Array.} events - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @instance - */ - ABCIMessageLog.prototype.events = $util.emptyArray; - - /** - * Creates a new ABCIMessageLog instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @static - * @param {cosmos.base.abci.v1beta1.IABCIMessageLog=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.ABCIMessageLog} ABCIMessageLog instance - */ - ABCIMessageLog.create = function create(properties) { - return new ABCIMessageLog(properties); - }; - - /** - * Encodes the specified ABCIMessageLog message. Does not implicitly {@link cosmos.base.abci.v1beta1.ABCIMessageLog.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @static - * @param {cosmos.base.abci.v1beta1.IABCIMessageLog} message ABCIMessageLog message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ABCIMessageLog.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.msgIndex != null && Object.hasOwnProperty.call(message, "msgIndex")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msgIndex); - if (message.log != null && Object.hasOwnProperty.call(message, "log")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.log); - if (message.events != null && message.events.length) - for (let i = 0; i < message.events.length; ++i) - $root.cosmos.base.abci.v1beta1.StringEvent.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ABCIMessageLog message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.ABCIMessageLog.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @static - * @param {cosmos.base.abci.v1beta1.IABCIMessageLog} message ABCIMessageLog message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ABCIMessageLog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ABCIMessageLog message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.ABCIMessageLog} ABCIMessageLog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ABCIMessageLog.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.ABCIMessageLog(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgIndex = reader.uint32(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.cosmos.base.abci.v1beta1.StringEvent.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ABCIMessageLog message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.ABCIMessageLog} ABCIMessageLog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ABCIMessageLog.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ABCIMessageLog message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ABCIMessageLog.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.msgIndex != null && message.hasOwnProperty("msgIndex")) - if (!$util.isInteger(message.msgIndex)) - return "msgIndex: integer expected"; - if (message.log != null && message.hasOwnProperty("log")) - if (!$util.isString(message.log)) - return "log: string expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (let i = 0; i < message.events.length; ++i) { - let error = $root.cosmos.base.abci.v1beta1.StringEvent.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates a ABCIMessageLog message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.ABCIMessageLog} ABCIMessageLog - */ - ABCIMessageLog.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.ABCIMessageLog) - return object; - let message = new $root.cosmos.base.abci.v1beta1.ABCIMessageLog(); - if (object.msgIndex != null) - message.msgIndex = object.msgIndex >>> 0; - if (object.log != null) - message.log = String(object.log); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".cosmos.base.abci.v1beta1.ABCIMessageLog.events: array expected"); - message.events = []; - for (let i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.ABCIMessageLog.events: object expected"); - message.events[i] = $root.cosmos.base.abci.v1beta1.StringEvent.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ABCIMessageLog message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @static - * @param {cosmos.base.abci.v1beta1.ABCIMessageLog} message ABCIMessageLog - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ABCIMessageLog.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - object.msgIndex = 0; - object.log = ""; - } - if (message.msgIndex != null && message.hasOwnProperty("msgIndex")) - object.msgIndex = message.msgIndex; - if (message.log != null && message.hasOwnProperty("log")) - object.log = message.log; - if (message.events && message.events.length) { - object.events = []; - for (let j = 0; j < message.events.length; ++j) - object.events[j] = $root.cosmos.base.abci.v1beta1.StringEvent.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this ABCIMessageLog to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog - * @instance - * @returns {Object.} JSON object - */ - ABCIMessageLog.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ABCIMessageLog; - })(v1beta1.ABCIMessageLog || {}); - - v1beta1.StringEvent = (function(StringEvent) { - - /** - * Properties of a StringEvent. - * @memberof cosmos.base.abci.v1beta1 - * @interface IStringEvent - * @property {string|null} [type] StringEvent type - * @property {Array.|null} [attributes] StringEvent attributes - */ - - /** - * Constructs a new StringEvent. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a StringEvent. - * @implements IStringEvent - * @constructor - * @param {cosmos.base.abci.v1beta1.IStringEvent=} [properties] Properties to set - */ - function StringEvent(properties) { - this.attributes = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringEvent type. - * @member {string} type - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @instance - */ - StringEvent.prototype.type = ""; - - /** - * StringEvent attributes. - * @member {Array.} attributes - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @instance - */ - StringEvent.prototype.attributes = $util.emptyArray; - - /** - * Creates a new StringEvent instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @static - * @param {cosmos.base.abci.v1beta1.IStringEvent=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.StringEvent} StringEvent instance - */ - StringEvent.create = function create(properties) { - return new StringEvent(properties); - }; - - /** - * Encodes the specified StringEvent message. Does not implicitly {@link cosmos.base.abci.v1beta1.StringEvent.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @static - * @param {cosmos.base.abci.v1beta1.IStringEvent} message StringEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.attributes != null && message.attributes.length) - for (let i = 0; i < message.attributes.length; ++i) - $root.cosmos.base.abci.v1beta1.Attribute.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StringEvent message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.StringEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @static - * @param {cosmos.base.abci.v1beta1.IStringEvent} message StringEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringEvent message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.StringEvent} StringEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.StringEvent(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.cosmos.base.abci.v1beta1.Attribute.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.StringEvent} StringEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringEvent message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (let i = 0; i < message.attributes.length; ++i) { - let error = $root.cosmos.base.abci.v1beta1.Attribute.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - return null; - }; - - /** - * Creates a StringEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.StringEvent} StringEvent - */ - StringEvent.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.StringEvent) - return object; - let message = new $root.cosmos.base.abci.v1beta1.StringEvent(); - if (object.type != null) - message.type = String(object.type); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".cosmos.base.abci.v1beta1.StringEvent.attributes: array expected"); - message.attributes = []; - for (let i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.StringEvent.attributes: object expected"); - message.attributes[i] = $root.cosmos.base.abci.v1beta1.Attribute.fromObject(object.attributes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a StringEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @static - * @param {cosmos.base.abci.v1beta1.StringEvent} message StringEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (let j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.cosmos.base.abci.v1beta1.Attribute.toObject(message.attributes[j], options); - } - return object; - }; - - /** - * Converts this StringEvent to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.StringEvent - * @instance - * @returns {Object.} JSON object - */ - StringEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StringEvent; - })(v1beta1.StringEvent || {}); - - v1beta1.Attribute = (function(Attribute) { - - /** - * Properties of an Attribute. - * @memberof cosmos.base.abci.v1beta1 - * @interface IAttribute - * @property {string|null} [key] Attribute key - * @property {string|null} [value] Attribute value - */ - - /** - * Constructs a new Attribute. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents an Attribute. - * @implements IAttribute - * @constructor - * @param {cosmos.base.abci.v1beta1.IAttribute=} [properties] Properties to set - */ - function Attribute(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Attribute key. - * @member {string} key - * @memberof cosmos.base.abci.v1beta1.Attribute - * @instance - */ - Attribute.prototype.key = ""; - - /** - * Attribute value. - * @member {string} value - * @memberof cosmos.base.abci.v1beta1.Attribute - * @instance - */ - Attribute.prototype.value = ""; - - /** - * Creates a new Attribute instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.Attribute - * @static - * @param {cosmos.base.abci.v1beta1.IAttribute=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.Attribute} Attribute instance - */ - Attribute.create = function create(properties) { - return new Attribute(properties); - }; - - /** - * Encodes the specified Attribute message. Does not implicitly {@link cosmos.base.abci.v1beta1.Attribute.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.Attribute - * @static - * @param {cosmos.base.abci.v1beta1.IAttribute} message Attribute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attribute.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified Attribute message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.Attribute.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.Attribute - * @static - * @param {cosmos.base.abci.v1beta1.IAttribute} message Attribute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Attribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Attribute message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.Attribute - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.Attribute} Attribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attribute.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.Attribute(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Attribute message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.Attribute - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.Attribute} Attribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Attribute.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Attribute message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.Attribute - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Attribute.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an Attribute message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.Attribute - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.Attribute} Attribute - */ - Attribute.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.Attribute) - return object; - let message = new $root.cosmos.base.abci.v1beta1.Attribute(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an Attribute message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.Attribute - * @static - * @param {cosmos.base.abci.v1beta1.Attribute} message Attribute - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Attribute.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.key = ""; - object.value = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this Attribute to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.Attribute - * @instance - * @returns {Object.} JSON object - */ - Attribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Attribute; - })(v1beta1.Attribute || {}); - - v1beta1.GasInfo = (function(GasInfo) { - - /** - * Properties of a GasInfo. - * @memberof cosmos.base.abci.v1beta1 - * @interface IGasInfo - * @property {number|Long|null} [gasWanted] GasInfo gasWanted - * @property {number|Long|null} [gasUsed] GasInfo gasUsed - */ - - /** - * Constructs a new GasInfo. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a GasInfo. - * @implements IGasInfo - * @constructor - * @param {cosmos.base.abci.v1beta1.IGasInfo=} [properties] Properties to set - */ - function GasInfo(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GasInfo gasWanted. - * @member {number|Long} gasWanted - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @instance - */ - GasInfo.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * GasInfo gasUsed. - * @member {number|Long} gasUsed - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @instance - */ - GasInfo.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new GasInfo instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @static - * @param {cosmos.base.abci.v1beta1.IGasInfo=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.GasInfo} GasInfo instance - */ - GasInfo.create = function create(properties) { - return new GasInfo(properties); - }; - - /** - * Encodes the specified GasInfo message. Does not implicitly {@link cosmos.base.abci.v1beta1.GasInfo.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @static - * @param {cosmos.base.abci.v1beta1.IGasInfo} message GasInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GasInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.gasWanted); - if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasUsed); - return writer; - }; - - /** - * Encodes the specified GasInfo message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.GasInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @static - * @param {cosmos.base.abci.v1beta1.IGasInfo} message GasInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GasInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GasInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.GasInfo} GasInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GasInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.GasInfo(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasWanted = reader.uint64(); - break; - case 2: - message.gasUsed = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GasInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.GasInfo} GasInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GasInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GasInfo message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GasInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) - return "gasWanted: integer|Long expected"; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) - return "gasUsed: integer|Long expected"; - return null; - }; - - /** - * Creates a GasInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.GasInfo} GasInfo - */ - GasInfo.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.GasInfo) - return object; - let message = new $root.cosmos.base.abci.v1beta1.GasInfo(); - if (object.gasWanted != null) - if ($util.Long) - (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = true; - else if (typeof object.gasWanted === "string") - message.gasWanted = parseInt(object.gasWanted, 10); - else if (typeof object.gasWanted === "number") - message.gasWanted = object.gasWanted; - else if (typeof object.gasWanted === "object") - message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(true); - if (object.gasUsed != null) - if ($util.Long) - (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = true; - else if (typeof object.gasUsed === "string") - message.gasUsed = parseInt(object.gasUsed, 10); - else if (typeof object.gasUsed === "number") - message.gasUsed = object.gasUsed; - else if (typeof object.gasUsed === "object") - message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a GasInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @static - * @param {cosmos.base.abci.v1beta1.GasInfo} message GasInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GasInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasWanted = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasUsed = options.longs === String ? "0" : 0; - } - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (typeof message.gasWanted === "number") - object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; - else - object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber(true) : message.gasWanted; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (typeof message.gasUsed === "number") - object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; - else - object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber(true) : message.gasUsed; - return object; - }; - - /** - * Converts this GasInfo to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.GasInfo - * @instance - * @returns {Object.} JSON object - */ - GasInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GasInfo; - })(v1beta1.GasInfo || {}); - - v1beta1.Result = (function(Result) { - - /** - * Properties of a Result. - * @memberof cosmos.base.abci.v1beta1 - * @interface IResult - * @property {Uint8Array|null} [data] Result data - * @property {string|null} [log] Result log - * @property {Array.|null} [events] Result events - */ - - /** - * Constructs a new Result. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a Result. - * @implements IResult - * @constructor - * @param {cosmos.base.abci.v1beta1.IResult=} [properties] Properties to set - */ - function Result(properties) { - this.events = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Result data. - * @member {Uint8Array} data - * @memberof cosmos.base.abci.v1beta1.Result - * @instance - */ - Result.prototype.data = $util.newBuffer([]); - - /** - * Result log. - * @member {string} log - * @memberof cosmos.base.abci.v1beta1.Result - * @instance - */ - Result.prototype.log = ""; - - /** - * Result events. - * @member {Array.} events - * @memberof cosmos.base.abci.v1beta1.Result - * @instance - */ - Result.prototype.events = $util.emptyArray; - - /** - * Creates a new Result instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.Result - * @static - * @param {cosmos.base.abci.v1beta1.IResult=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.Result} Result instance - */ - Result.create = function create(properties) { - return new Result(properties); - }; - - /** - * Encodes the specified Result message. Does not implicitly {@link cosmos.base.abci.v1beta1.Result.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.Result - * @static - * @param {cosmos.base.abci.v1beta1.IResult} message Result message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Result.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); - if (message.log != null && Object.hasOwnProperty.call(message, "log")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.log); - if (message.events != null && message.events.length) - for (let i = 0; i < message.events.length; ++i) - $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.Result.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.Result - * @static - * @param {cosmos.base.abci.v1beta1.IResult} message Result message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Result.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Result message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.Result - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.Result} Result - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Result.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.Result(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.data = reader.bytes(); - break; - case 2: - message.log = reader.string(); - break; - case 3: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Result message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.Result - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.Result} Result - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Result.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Result message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.Result - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Result.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - if (message.log != null && message.hasOwnProperty("log")) - if (!$util.isString(message.log)) - return "log: string expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (let i = 0; i < message.events.length; ++i) { - let error = $root.tendermint.abci.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.Result - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.Result} Result - */ - Result.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.Result) - return object; - let message = new $root.cosmos.base.abci.v1beta1.Result(); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - if (object.log != null) - message.log = String(object.log); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".cosmos.base.abci.v1beta1.Result.events: array expected"); - message.events = []; - for (let i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.Result.events: object expected"); - message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Result message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.Result - * @static - * @param {cosmos.base.abci.v1beta1.Result} message Result - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Result.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.log = ""; - } - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.log != null && message.hasOwnProperty("log")) - object.log = message.log; - if (message.events && message.events.length) { - object.events = []; - for (let j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this Result to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.Result - * @instance - * @returns {Object.} JSON object - */ - Result.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Result; - })(v1beta1.Result || {}); - - v1beta1.SimulationResponse = (function(SimulationResponse) { - - /** - * Properties of a SimulationResponse. - * @memberof cosmos.base.abci.v1beta1 - * @interface ISimulationResponse - * @property {cosmos.base.abci.v1beta1.IGasInfo|null} [gasInfo] SimulationResponse gasInfo - * @property {cosmos.base.abci.v1beta1.IResult|null} [result] SimulationResponse result - */ - - /** - * Constructs a new SimulationResponse. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a SimulationResponse. - * @implements ISimulationResponse - * @constructor - * @param {cosmos.base.abci.v1beta1.ISimulationResponse=} [properties] Properties to set - */ - function SimulationResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimulationResponse gasInfo. - * @member {cosmos.base.abci.v1beta1.IGasInfo|null|undefined} gasInfo - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @instance - */ - SimulationResponse.prototype.gasInfo = null; - - /** - * SimulationResponse result. - * @member {cosmos.base.abci.v1beta1.IResult|null|undefined} result - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @instance - */ - SimulationResponse.prototype.result = null; - - /** - * Creates a new SimulationResponse instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @static - * @param {cosmos.base.abci.v1beta1.ISimulationResponse=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.SimulationResponse} SimulationResponse instance - */ - SimulationResponse.create = function create(properties) { - return new SimulationResponse(properties); - }; - - /** - * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos.base.abci.v1beta1.SimulationResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @static - * @param {cosmos.base.abci.v1beta1.ISimulationResponse} message SimulationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulationResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gasInfo != null && Object.hasOwnProperty.call(message, "gasInfo")) - $root.cosmos.base.abci.v1beta1.GasInfo.encode(message.gasInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.cosmos.base.abci.v1beta1.Result.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SimulationResponse message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.SimulationResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @static - * @param {cosmos.base.abci.v1beta1.ISimulationResponse} message SimulationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.SimulationResponse} SimulationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulationResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.SimulationResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.decode(reader, reader.uint32()); - break; - case 2: - message.result = $root.cosmos.base.abci.v1beta1.Result.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.SimulationResponse} SimulationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulationResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulationResponse message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulationResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) { - let error = $root.cosmos.base.abci.v1beta1.GasInfo.verify(message.gasInfo); - if (error) - return "gasInfo." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - let error = $root.cosmos.base.abci.v1beta1.Result.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a SimulationResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.SimulationResponse} SimulationResponse - */ - SimulationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.SimulationResponse) - return object; - let message = new $root.cosmos.base.abci.v1beta1.SimulationResponse(); - if (object.gasInfo != null) { - if (typeof object.gasInfo !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.SimulationResponse.gasInfo: object expected"); - message.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.fromObject(object.gasInfo); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.SimulationResponse.result: object expected"); - message.result = $root.cosmos.base.abci.v1beta1.Result.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a SimulationResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @static - * @param {cosmos.base.abci.v1beta1.SimulationResponse} message SimulationResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulationResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.gasInfo = null; - object.result = null; - } - if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) - object.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.toObject(message.gasInfo, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.cosmos.base.abci.v1beta1.Result.toObject(message.result, options); - return object; - }; - - /** - * Converts this SimulationResponse to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.SimulationResponse - * @instance - * @returns {Object.} JSON object - */ - SimulationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SimulationResponse; - })(v1beta1.SimulationResponse || {}); - - v1beta1.MsgData = (function(MsgData) { - - /** - * Properties of a MsgData. - * @memberof cosmos.base.abci.v1beta1 - * @interface IMsgData - * @property {string|null} [msgType] MsgData msgType - * @property {Uint8Array|null} [data] MsgData data - */ - - /** - * Constructs a new MsgData. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a MsgData. - * @implements IMsgData - * @constructor - * @param {cosmos.base.abci.v1beta1.IMsgData=} [properties] Properties to set - */ - function MsgData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgData msgType. - * @member {string} msgType - * @memberof cosmos.base.abci.v1beta1.MsgData - * @instance - */ - MsgData.prototype.msgType = ""; - - /** - * MsgData data. - * @member {Uint8Array} data - * @memberof cosmos.base.abci.v1beta1.MsgData - * @instance - */ - MsgData.prototype.data = $util.newBuffer([]); - - /** - * Creates a new MsgData instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.MsgData - * @static - * @param {cosmos.base.abci.v1beta1.IMsgData=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.MsgData} MsgData instance - */ - MsgData.create = function create(properties) { - return new MsgData(properties); - }; - - /** - * Encodes the specified MsgData message. Does not implicitly {@link cosmos.base.abci.v1beta1.MsgData.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.MsgData - * @static - * @param {cosmos.base.abci.v1beta1.IMsgData} message MsgData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.msgType != null && Object.hasOwnProperty.call(message, "msgType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.msgType); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified MsgData message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.MsgData.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.MsgData - * @static - * @param {cosmos.base.abci.v1beta1.IMsgData} message MsgData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgData message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.MsgData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.MsgData} MsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.MsgData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msgType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.MsgData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.MsgData} MsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgData message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.MsgData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.msgType != null && message.hasOwnProperty("msgType")) - if (!$util.isString(message.msgType)) - return "msgType: string expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - return null; - }; - - /** - * Creates a MsgData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.MsgData - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.MsgData} MsgData - */ - MsgData.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.MsgData) - return object; - let message = new $root.cosmos.base.abci.v1beta1.MsgData(); - if (object.msgType != null) - message.msgType = String(object.msgType); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - return message; - }; - - /** - * Creates a plain object from a MsgData message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.MsgData - * @static - * @param {cosmos.base.abci.v1beta1.MsgData} message MsgData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.msgType = ""; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.msgType != null && message.hasOwnProperty("msgType")) - object.msgType = message.msgType; - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - return object; - }; - - /** - * Converts this MsgData to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.MsgData - * @instance - * @returns {Object.} JSON object - */ - MsgData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgData; - })(v1beta1.MsgData || {}); - - v1beta1.TxMsgData = (function(TxMsgData) { - - /** - * Properties of a TxMsgData. - * @memberof cosmos.base.abci.v1beta1 - * @interface ITxMsgData - * @property {Array.|null} [data] TxMsgData data - */ - - /** - * Constructs a new TxMsgData. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a TxMsgData. - * @implements ITxMsgData - * @constructor - * @param {cosmos.base.abci.v1beta1.ITxMsgData=} [properties] Properties to set - */ - function TxMsgData(properties) { - this.data = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TxMsgData data. - * @member {Array.} data - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @instance - */ - TxMsgData.prototype.data = $util.emptyArray; - - /** - * Creates a new TxMsgData instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @static - * @param {cosmos.base.abci.v1beta1.ITxMsgData=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.TxMsgData} TxMsgData instance - */ - TxMsgData.create = function create(properties) { - return new TxMsgData(properties); - }; - - /** - * Encodes the specified TxMsgData message. Does not implicitly {@link cosmos.base.abci.v1beta1.TxMsgData.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @static - * @param {cosmos.base.abci.v1beta1.ITxMsgData} message TxMsgData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxMsgData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.data != null && message.data.length) - for (let i = 0; i < message.data.length; ++i) - $root.cosmos.base.abci.v1beta1.MsgData.encode(message.data[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TxMsgData message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.TxMsgData.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @static - * @param {cosmos.base.abci.v1beta1.ITxMsgData} message TxMsgData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxMsgData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TxMsgData message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.TxMsgData} TxMsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxMsgData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.TxMsgData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.data && message.data.length)) - message.data = []; - message.data.push($root.cosmos.base.abci.v1beta1.MsgData.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TxMsgData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.TxMsgData} TxMsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxMsgData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxMsgData message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxMsgData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.data != null && message.hasOwnProperty("data")) { - if (!Array.isArray(message.data)) - return "data: array expected"; - for (let i = 0; i < message.data.length; ++i) { - let error = $root.cosmos.base.abci.v1beta1.MsgData.verify(message.data[i]); - if (error) - return "data." + error; - } - } - return null; - }; - - /** - * Creates a TxMsgData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.TxMsgData} TxMsgData - */ - TxMsgData.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.TxMsgData) - return object; - let message = new $root.cosmos.base.abci.v1beta1.TxMsgData(); - if (object.data) { - if (!Array.isArray(object.data)) - throw TypeError(".cosmos.base.abci.v1beta1.TxMsgData.data: array expected"); - message.data = []; - for (let i = 0; i < object.data.length; ++i) { - if (typeof object.data[i] !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.TxMsgData.data: object expected"); - message.data[i] = $root.cosmos.base.abci.v1beta1.MsgData.fromObject(object.data[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TxMsgData message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @static - * @param {cosmos.base.abci.v1beta1.TxMsgData} message TxMsgData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxMsgData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.data = []; - if (message.data && message.data.length) { - object.data = []; - for (let j = 0; j < message.data.length; ++j) - object.data[j] = $root.cosmos.base.abci.v1beta1.MsgData.toObject(message.data[j], options); - } - return object; - }; - - /** - * Converts this TxMsgData to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.TxMsgData - * @instance - * @returns {Object.} JSON object - */ - TxMsgData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TxMsgData; - })(v1beta1.TxMsgData || {}); - - v1beta1.SearchTxsResult = (function(SearchTxsResult) { - - /** - * Properties of a SearchTxsResult. - * @memberof cosmos.base.abci.v1beta1 - * @interface ISearchTxsResult - * @property {number|Long|null} [totalCount] SearchTxsResult totalCount - * @property {number|Long|null} [count] SearchTxsResult count - * @property {number|Long|null} [pageNumber] SearchTxsResult pageNumber - * @property {number|Long|null} [pageTotal] SearchTxsResult pageTotal - * @property {number|Long|null} [limit] SearchTxsResult limit - * @property {Array.|null} [txs] SearchTxsResult txs - */ - - /** - * Constructs a new SearchTxsResult. - * @memberof cosmos.base.abci.v1beta1 - * @classdesc Represents a SearchTxsResult. - * @implements ISearchTxsResult - * @constructor - * @param {cosmos.base.abci.v1beta1.ISearchTxsResult=} [properties] Properties to set - */ - function SearchTxsResult(properties) { - this.txs = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SearchTxsResult totalCount. - * @member {number|Long} totalCount - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @instance - */ - SearchTxsResult.prototype.totalCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SearchTxsResult count. - * @member {number|Long} count - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @instance - */ - SearchTxsResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SearchTxsResult pageNumber. - * @member {number|Long} pageNumber - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @instance - */ - SearchTxsResult.prototype.pageNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SearchTxsResult pageTotal. - * @member {number|Long} pageTotal - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @instance - */ - SearchTxsResult.prototype.pageTotal = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SearchTxsResult limit. - * @member {number|Long} limit - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @instance - */ - SearchTxsResult.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SearchTxsResult txs. - * @member {Array.} txs - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @instance - */ - SearchTxsResult.prototype.txs = $util.emptyArray; - - /** - * Creates a new SearchTxsResult instance using the specified properties. - * @function create - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @static - * @param {cosmos.base.abci.v1beta1.ISearchTxsResult=} [properties] Properties to set - * @returns {cosmos.base.abci.v1beta1.SearchTxsResult} SearchTxsResult instance - */ - SearchTxsResult.create = function create(properties) { - return new SearchTxsResult(properties); - }; - - /** - * Encodes the specified SearchTxsResult message. Does not implicitly {@link cosmos.base.abci.v1beta1.SearchTxsResult.verify|verify} messages. - * @function encode - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @static - * @param {cosmos.base.abci.v1beta1.ISearchTxsResult} message SearchTxsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTxsResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.totalCount); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.count); - if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.pageNumber); - if (message.pageTotal != null && Object.hasOwnProperty.call(message, "pageTotal")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.pageTotal); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.limit); - if (message.txs != null && message.txs.length) - for (let i = 0; i < message.txs.length; ++i) - $root.cosmos.base.abci.v1beta1.TxResponse.encode(message.txs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SearchTxsResult message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.SearchTxsResult.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @static - * @param {cosmos.base.abci.v1beta1.ISearchTxsResult} message SearchTxsResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SearchTxsResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SearchTxsResult message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.abci.v1beta1.SearchTxsResult} SearchTxsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTxsResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.SearchTxsResult(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.totalCount = reader.uint64(); - break; - case 2: - message.count = reader.uint64(); - break; - case 3: - message.pageNumber = reader.uint64(); - break; - case 4: - message.pageTotal = reader.uint64(); - break; - case 5: - message.limit = reader.uint64(); - break; - case 6: - if (!(message.txs && message.txs.length)) - message.txs = []; - message.txs.push($root.cosmos.base.abci.v1beta1.TxResponse.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SearchTxsResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.abci.v1beta1.SearchTxsResult} SearchTxsResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SearchTxsResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SearchTxsResult message. - * @function verify - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SearchTxsResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.totalCount != null && message.hasOwnProperty("totalCount")) - if (!$util.isInteger(message.totalCount) && !(message.totalCount && $util.isInteger(message.totalCount.low) && $util.isInteger(message.totalCount.high))) - return "totalCount: integer|Long expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) - if (!$util.isInteger(message.pageNumber) && !(message.pageNumber && $util.isInteger(message.pageNumber.low) && $util.isInteger(message.pageNumber.high))) - return "pageNumber: integer|Long expected"; - if (message.pageTotal != null && message.hasOwnProperty("pageTotal")) - if (!$util.isInteger(message.pageTotal) && !(message.pageTotal && $util.isInteger(message.pageTotal.low) && $util.isInteger(message.pageTotal.high))) - return "pageTotal: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.txs != null && message.hasOwnProperty("txs")) { - if (!Array.isArray(message.txs)) - return "txs: array expected"; - for (let i = 0; i < message.txs.length; ++i) { - let error = $root.cosmos.base.abci.v1beta1.TxResponse.verify(message.txs[i]); - if (error) - return "txs." + error; - } - } - return null; - }; - - /** - * Creates a SearchTxsResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.abci.v1beta1.SearchTxsResult} SearchTxsResult - */ - SearchTxsResult.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.abci.v1beta1.SearchTxsResult) - return object; - let message = new $root.cosmos.base.abci.v1beta1.SearchTxsResult(); - if (object.totalCount != null) - if ($util.Long) - (message.totalCount = $util.Long.fromValue(object.totalCount)).unsigned = true; - else if (typeof object.totalCount === "string") - message.totalCount = parseInt(object.totalCount, 10); - else if (typeof object.totalCount === "number") - message.totalCount = object.totalCount; - else if (typeof object.totalCount === "object") - message.totalCount = new $util.LongBits(object.totalCount.low >>> 0, object.totalCount.high >>> 0).toNumber(true); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = true; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(true); - if (object.pageNumber != null) - if ($util.Long) - (message.pageNumber = $util.Long.fromValue(object.pageNumber)).unsigned = true; - else if (typeof object.pageNumber === "string") - message.pageNumber = parseInt(object.pageNumber, 10); - else if (typeof object.pageNumber === "number") - message.pageNumber = object.pageNumber; - else if (typeof object.pageNumber === "object") - message.pageNumber = new $util.LongBits(object.pageNumber.low >>> 0, object.pageNumber.high >>> 0).toNumber(true); - if (object.pageTotal != null) - if ($util.Long) - (message.pageTotal = $util.Long.fromValue(object.pageTotal)).unsigned = true; - else if (typeof object.pageTotal === "string") - message.pageTotal = parseInt(object.pageTotal, 10); - else if (typeof object.pageTotal === "number") - message.pageTotal = object.pageTotal; - else if (typeof object.pageTotal === "object") - message.pageTotal = new $util.LongBits(object.pageTotal.low >>> 0, object.pageTotal.high >>> 0).toNumber(true); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); - if (object.txs) { - if (!Array.isArray(object.txs)) - throw TypeError(".cosmos.base.abci.v1beta1.SearchTxsResult.txs: array expected"); - message.txs = []; - for (let i = 0; i < object.txs.length; ++i) { - if (typeof object.txs[i] !== "object") - throw TypeError(".cosmos.base.abci.v1beta1.SearchTxsResult.txs: object expected"); - message.txs[i] = $root.cosmos.base.abci.v1beta1.TxResponse.fromObject(object.txs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SearchTxsResult message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @static - * @param {cosmos.base.abci.v1beta1.SearchTxsResult} message SearchTxsResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SearchTxsResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.txs = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.totalCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalCount = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.pageNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.pageNumber = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.pageTotal = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.pageTotal = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - } - if (message.totalCount != null && message.hasOwnProperty("totalCount")) - if (typeof message.totalCount === "number") - object.totalCount = options.longs === String ? String(message.totalCount) : message.totalCount; - else - object.totalCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalCount) : options.longs === Number ? new $util.LongBits(message.totalCount.low >>> 0, message.totalCount.high >>> 0).toNumber(true) : message.totalCount; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber(true) : message.count; - if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) - if (typeof message.pageNumber === "number") - object.pageNumber = options.longs === String ? String(message.pageNumber) : message.pageNumber; - else - object.pageNumber = options.longs === String ? $util.Long.prototype.toString.call(message.pageNumber) : options.longs === Number ? new $util.LongBits(message.pageNumber.low >>> 0, message.pageNumber.high >>> 0).toNumber(true) : message.pageNumber; - if (message.pageTotal != null && message.hasOwnProperty("pageTotal")) - if (typeof message.pageTotal === "number") - object.pageTotal = options.longs === String ? String(message.pageTotal) : message.pageTotal; - else - object.pageTotal = options.longs === String ? $util.Long.prototype.toString.call(message.pageTotal) : options.longs === Number ? new $util.LongBits(message.pageTotal.low >>> 0, message.pageTotal.high >>> 0).toNumber(true) : message.pageTotal; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; - if (message.txs && message.txs.length) { - object.txs = []; - for (let j = 0; j < message.txs.length; ++j) - object.txs[j] = $root.cosmos.base.abci.v1beta1.TxResponse.toObject(message.txs[j], options); - } - return object; - }; - - /** - * Converts this SearchTxsResult to JSON. - * @function toJSON - * @memberof cosmos.base.abci.v1beta1.SearchTxsResult - * @instance - * @returns {Object.} JSON object - */ - SearchTxsResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SearchTxsResult; - })(v1beta1.SearchTxsResult || {}); - - return v1beta1; - })(abci.v1beta1 || {}); - - return abci; - })(base.abci || {}); - - /** - * Namespace kv. - * @memberof cosmos.base - * @namespace - */ - - base.kv = (function(kv) { - - /** - * Namespace v1beta1. - * @memberof cosmos.base.kv - * @namespace - */ - - kv.v1beta1 = (function(v1beta1) { - - v1beta1.Pairs = (function(Pairs) { - - /** - * Properties of a Pairs. - * @memberof cosmos.base.kv.v1beta1 - * @interface IPairs - * @property {Array.|null} [pairs] Pairs pairs - */ - - /** - * Constructs a new Pairs. - * @memberof cosmos.base.kv.v1beta1 - * @classdesc Represents a Pairs. - * @implements IPairs - * @constructor - * @param {cosmos.base.kv.v1beta1.IPairs=} [properties] Properties to set - */ - function Pairs(properties) { - this.pairs = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Pairs pairs. - * @member {Array.} pairs - * @memberof cosmos.base.kv.v1beta1.Pairs - * @instance - */ - Pairs.prototype.pairs = $util.emptyArray; - - /** - * Creates a new Pairs instance using the specified properties. - * @function create - * @memberof cosmos.base.kv.v1beta1.Pairs - * @static - * @param {cosmos.base.kv.v1beta1.IPairs=} [properties] Properties to set - * @returns {cosmos.base.kv.v1beta1.Pairs} Pairs instance - */ - Pairs.create = function create(properties) { - return new Pairs(properties); - }; - - /** - * Encodes the specified Pairs message. Does not implicitly {@link cosmos.base.kv.v1beta1.Pairs.verify|verify} messages. - * @function encode - * @memberof cosmos.base.kv.v1beta1.Pairs - * @static - * @param {cosmos.base.kv.v1beta1.IPairs} message Pairs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pairs.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pairs != null && message.pairs.length) - for (let i = 0; i < message.pairs.length; ++i) - $root.cosmos.base.kv.v1beta1.Pair.encode(message.pairs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Pairs message, length delimited. Does not implicitly {@link cosmos.base.kv.v1beta1.Pairs.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.kv.v1beta1.Pairs - * @static - * @param {cosmos.base.kv.v1beta1.IPairs} message Pairs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pairs.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Pairs message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.kv.v1beta1.Pairs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.kv.v1beta1.Pairs} Pairs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pairs.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.kv.v1beta1.Pairs(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.pairs && message.pairs.length)) - message.pairs = []; - message.pairs.push($root.cosmos.base.kv.v1beta1.Pair.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Pairs message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.kv.v1beta1.Pairs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.kv.v1beta1.Pairs} Pairs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pairs.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Pairs message. - * @function verify - * @memberof cosmos.base.kv.v1beta1.Pairs - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Pairs.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pairs != null && message.hasOwnProperty("pairs")) { - if (!Array.isArray(message.pairs)) - return "pairs: array expected"; - for (let i = 0; i < message.pairs.length; ++i) { - let error = $root.cosmos.base.kv.v1beta1.Pair.verify(message.pairs[i]); - if (error) - return "pairs." + error; - } - } - return null; - }; - - /** - * Creates a Pairs message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.kv.v1beta1.Pairs - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.kv.v1beta1.Pairs} Pairs - */ - Pairs.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.kv.v1beta1.Pairs) - return object; - let message = new $root.cosmos.base.kv.v1beta1.Pairs(); - if (object.pairs) { - if (!Array.isArray(object.pairs)) - throw TypeError(".cosmos.base.kv.v1beta1.Pairs.pairs: array expected"); - message.pairs = []; - for (let i = 0; i < object.pairs.length; ++i) { - if (typeof object.pairs[i] !== "object") - throw TypeError(".cosmos.base.kv.v1beta1.Pairs.pairs: object expected"); - message.pairs[i] = $root.cosmos.base.kv.v1beta1.Pair.fromObject(object.pairs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Pairs message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.kv.v1beta1.Pairs - * @static - * @param {cosmos.base.kv.v1beta1.Pairs} message Pairs - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Pairs.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.pairs = []; - if (message.pairs && message.pairs.length) { - object.pairs = []; - for (let j = 0; j < message.pairs.length; ++j) - object.pairs[j] = $root.cosmos.base.kv.v1beta1.Pair.toObject(message.pairs[j], options); - } - return object; - }; - - /** - * Converts this Pairs to JSON. - * @function toJSON - * @memberof cosmos.base.kv.v1beta1.Pairs - * @instance - * @returns {Object.} JSON object - */ - Pairs.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Pairs; - })(v1beta1.Pairs || {}); - - v1beta1.Pair = (function(Pair) { - - /** - * Properties of a Pair. - * @memberof cosmos.base.kv.v1beta1 - * @interface IPair - * @property {Uint8Array|null} [key] Pair key - * @property {Uint8Array|null} [value] Pair value - */ - - /** - * Constructs a new Pair. - * @memberof cosmos.base.kv.v1beta1 - * @classdesc Represents a Pair. - * @implements IPair - * @constructor - * @param {cosmos.base.kv.v1beta1.IPair=} [properties] Properties to set - */ - function Pair(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Pair key. - * @member {Uint8Array} key - * @memberof cosmos.base.kv.v1beta1.Pair - * @instance - */ - Pair.prototype.key = $util.newBuffer([]); - - /** - * Pair value. - * @member {Uint8Array} value - * @memberof cosmos.base.kv.v1beta1.Pair - * @instance - */ - Pair.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Pair instance using the specified properties. - * @function create - * @memberof cosmos.base.kv.v1beta1.Pair - * @static - * @param {cosmos.base.kv.v1beta1.IPair=} [properties] Properties to set - * @returns {cosmos.base.kv.v1beta1.Pair} Pair instance - */ - Pair.create = function create(properties) { - return new Pair(properties); - }; - - /** - * Encodes the specified Pair message. Does not implicitly {@link cosmos.base.kv.v1beta1.Pair.verify|verify} messages. - * @function encode - * @memberof cosmos.base.kv.v1beta1.Pair - * @static - * @param {cosmos.base.kv.v1beta1.IPair} message Pair message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pair.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Pair message, length delimited. Does not implicitly {@link cosmos.base.kv.v1beta1.Pair.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.kv.v1beta1.Pair - * @static - * @param {cosmos.base.kv.v1beta1.IPair} message Pair message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Pair message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.kv.v1beta1.Pair - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.kv.v1beta1.Pair} Pair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pair.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.kv.v1beta1.Pair(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Pair message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.kv.v1beta1.Pair - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.kv.v1beta1.Pair} Pair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pair.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Pair message. - * @function verify - * @memberof cosmos.base.kv.v1beta1.Pair - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Pair.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates a Pair message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.kv.v1beta1.Pair - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.kv.v1beta1.Pair} Pair - */ - Pair.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.kv.v1beta1.Pair) - return object; - let message = new $root.cosmos.base.kv.v1beta1.Pair(); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from a Pair message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.kv.v1beta1.Pair - * @static - * @param {cosmos.base.kv.v1beta1.Pair} message Pair - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Pair.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Pair to JSON. - * @function toJSON - * @memberof cosmos.base.kv.v1beta1.Pair - * @instance - * @returns {Object.} JSON object - */ - Pair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Pair; - })(v1beta1.Pair || {}); - - return v1beta1; - })(kv.v1beta1 || {}); - - return kv; - })(base.kv || {}); - - /** - * Namespace query. - * @memberof cosmos.base - * @namespace - */ - - base.query = (function(query) { - - /** - * Namespace v1beta1. - * @memberof cosmos.base.query - * @namespace - */ - - query.v1beta1 = (function(v1beta1) { - - v1beta1.PageRequest = (function(PageRequest) { - - /** - * Properties of a PageRequest. - * @memberof cosmos.base.query.v1beta1 - * @interface IPageRequest - * @property {Uint8Array|null} [key] PageRequest key - * @property {number|Long|null} [offset] PageRequest offset - * @property {number|Long|null} [limit] PageRequest limit - * @property {boolean|null} [countTotal] PageRequest countTotal - */ - - /** - * Constructs a new PageRequest. - * @memberof cosmos.base.query.v1beta1 - * @classdesc Represents a PageRequest. - * @implements IPageRequest - * @constructor - * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set - */ - function PageRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PageRequest key. - * @member {Uint8Array} key - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.key = $util.newBuffer([]); - - /** - * PageRequest offset. - * @member {number|Long} offset - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PageRequest limit. - * @member {number|Long} limit - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PageRequest countTotal. - * @member {boolean} countTotal - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.countTotal = false; - - /** - * Creates a new PageRequest instance using the specified properties. - * @function create - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest instance - */ - PageRequest.create = function create(properties) { - return new PageRequest(properties); - }; - - /** - * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.limit); - if (message.countTotal != null && Object.hasOwnProperty.call(message, "countTotal")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.countTotal); - return writer; - }; - - /** - * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PageRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = reader.uint64(); - break; - case 3: - message.limit = reader.uint64(); - break; - case 4: - message.countTotal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PageRequest message. - * @function verify - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.countTotal != null && message.hasOwnProperty("countTotal")) - if (typeof message.countTotal !== "boolean") - return "countTotal: boolean expected"; - return null; - }; - - /** - * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - */ - PageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.query.v1beta1.PageRequest) - return object; - let message = new $root.cosmos.base.query.v1beta1.PageRequest(); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = true; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(true); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); - if (object.countTotal != null) - message.countTotal = Boolean(object.countTotal); - return message; - }; - - /** - * Creates a plain object from a PageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.PageRequest} message PageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.countTotal = false; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; - if (message.countTotal != null && message.hasOwnProperty("countTotal")) - object.countTotal = message.countTotal; - return object; - }; - - /** - * Converts this PageRequest to JSON. - * @function toJSON - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - * @returns {Object.} JSON object - */ - PageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PageRequest; - })(v1beta1.PageRequest || {}); - - v1beta1.PageResponse = (function(PageResponse) { - - /** - * Properties of a PageResponse. - * @memberof cosmos.base.query.v1beta1 - * @interface IPageResponse - * @property {Uint8Array|null} [nextKey] PageResponse nextKey - * @property {number|Long|null} [total] PageResponse total - */ - - /** - * Constructs a new PageResponse. - * @memberof cosmos.base.query.v1beta1 - * @classdesc Represents a PageResponse. - * @implements IPageResponse - * @constructor - * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set - */ - function PageResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PageResponse nextKey. - * @member {Uint8Array} nextKey - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - */ - PageResponse.prototype.nextKey = $util.newBuffer([]); - - /** - * PageResponse total. - * @member {number|Long} total - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - */ - PageResponse.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new PageResponse instance using the specified properties. - * @function create - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse instance - */ - PageResponse.create = function create(properties) { - return new PageResponse(properties); - }; - - /** - * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nextKey != null && Object.hasOwnProperty.call(message, "nextKey")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.nextKey); - if (message.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.total); - return writer; - }; - - /** - * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PageResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.nextKey = reader.bytes(); - break; - case 2: - message.total = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PageResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PageResponse message. - * @function verify - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PageResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.nextKey != null && message.hasOwnProperty("nextKey")) - if (!(message.nextKey && typeof message.nextKey.length === "number" || $util.isString(message.nextKey))) - return "nextKey: buffer expected"; - if (message.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) - return "total: integer|Long expected"; - return null; - }; - - /** - * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {Object.
- Your cart is empty -
- - {{ notification.title }} - -
- {{ userData.fullName || userData.username }} -