diff --git a/.telescope.json b/.telescope.json
index 510be282..a2d0f66f 100644
--- a/.telescope.json
+++ b/.telescope.json
@@ -1,8 +1,8 @@
{
"protoDirs": [
- "./protos"
+ "./protos/injectivejs"
],
- "outPath": "./libs/interchain-query/src",
+ "outPath": "./libs/injectivejs/src",
"options": {
"classesUseArrowFunctions": true,
"env": "v-next",
@@ -60,7 +60,7 @@
},
"helperFuncCreators": {
"enabled": true,
- "genCustomHooks": true
+ "genCustomHooks": false
},
"interfaces": {
"enabled": true,
diff --git a/git-modules/cometbft/cometbft/main b/git-modules/cometbft/cometbft/main
index 43dcd47c..e2c3fd40 160000
--- a/git-modules/cometbft/cometbft/main
+++ b/git-modules/cometbft/cometbft/main
@@ -1 +1 @@
-Subproject commit 43dcd47c99cb8014890e8d4264696efe2285d571
+Subproject commit e2c3fd400f52aecf50c78ec0a3bda73ebb5ff76b
diff --git a/git-modules/cosmos/cosmos-proto/main b/git-modules/cosmos/cosmos-proto/main
index 6749af0d..3e538125 160000
--- a/git-modules/cosmos/cosmos-proto/main
+++ b/git-modules/cosmos/cosmos-proto/main
@@ -1 +1 @@
-Subproject commit 6749af0d5eaee07f371396092a2802b8941ff01f
+Subproject commit 3e53812559a5f89540930b1a40f16266a73ce1c9
diff --git a/git-modules/cosmos/cosmos-sdk/main b/git-modules/cosmos/cosmos-sdk/main
index 05ff7a7c..9d9c19c0 160000
--- a/git-modules/cosmos/cosmos-sdk/main
+++ b/git-modules/cosmos/cosmos-sdk/main
@@ -1 +1 @@
-Subproject commit 05ff7a7cb72ef8399cb4de76bd1d7aab42debaf3
+Subproject commit 9d9c19c0f854c203ba1a202846eb9067124d4eff
diff --git a/git-modules/cosmos/cosmos-sdk/release/v0.50.x b/git-modules/cosmos/cosmos-sdk/release/v0.50.x
index aeb1e8f4..96a30160 160000
--- a/git-modules/cosmos/cosmos-sdk/release/v0.50.x
+++ b/git-modules/cosmos/cosmos-sdk/release/v0.50.x
@@ -1 +1 @@
-Subproject commit aeb1e8f46b8dad727e1935ac7728fb0c0327f280
+Subproject commit 96a30160b3453ebed51d6b684c73c5f89bca6233
diff --git a/git-modules/cosmos/gogoproto/main b/git-modules/cosmos/gogoproto/main
index 6eec9731..28b2faca 160000
--- a/git-modules/cosmos/gogoproto/main
+++ b/git-modules/cosmos/gogoproto/main
@@ -1 +1 @@
-Subproject commit 6eec9731781bf8ec4feb0e4098ffb19ee74afb50
+Subproject commit 28b2facaa30178e137477bcc756a72a7a3c84b6b
diff --git a/git-modules/cosmos/ibc-go/main b/git-modules/cosmos/ibc-go/main
index 061a565e..4eac951b 160000
--- a/git-modules/cosmos/ibc-go/main
+++ b/git-modules/cosmos/ibc-go/main
@@ -1 +1 @@
-Subproject commit 061a565ec136288a731baa394b283556bb1cb7bc
+Subproject commit 4eac951bfd4ad71338ce4bcd48367fb0afdf712e
diff --git a/git-modules/cosmos/ics23/master b/git-modules/cosmos/ics23/master
index 69d86966..a31bd4d9 160000
--- a/git-modules/cosmos/ics23/master
+++ b/git-modules/cosmos/ics23/master
@@ -1 +1 @@
-Subproject commit 69d86966af4cf42f5a81ecddf82d513995272398
+Subproject commit a31bd4d9ca77beca7218299727db5ad59e65f5b8
diff --git a/git-modules/cosmwasm/wasmd/main b/git-modules/cosmwasm/wasmd/main
index 21b048d5..b2b6abee 160000
--- a/git-modules/cosmwasm/wasmd/main
+++ b/git-modules/cosmwasm/wasmd/main
@@ -1 +1 @@
-Subproject commit 21b048d54e395ff9168e5c3037356a73797500ba
+Subproject commit b2b6abee8c9484a4bf668c1cc7119c994b2a7476
diff --git a/git-modules/googleapis/googleapis/master b/git-modules/googleapis/googleapis/master
index 573205a8..4743cf9e 160000
--- a/git-modules/googleapis/googleapis/master
+++ b/git-modules/googleapis/googleapis/master
@@ -1 +1 @@
-Subproject commit 573205a81b9b96ea6d4e0365373839b59f4b427e
+Subproject commit 4743cf9ecab30cb113a7809aacbdbbba376f79f6
diff --git a/git-modules/injectivelabs/sdk-go/master b/git-modules/injectivelabs/sdk-go/master
index 72947502..428cbcf1 160000
--- a/git-modules/injectivelabs/sdk-go/master
+++ b/git-modules/injectivelabs/sdk-go/master
@@ -1 +1 @@
-Subproject commit 729475023c82723025bea1161754637152ac271a
+Subproject commit 428cbcf1970f875d487319d572640256f7cdca25
diff --git a/git-modules/protocolbuffers/protobuf/main b/git-modules/protocolbuffers/protobuf/main
index bbf52275..c879cccf 160000
--- a/git-modules/protocolbuffers/protobuf/main
+++ b/git-modules/protocolbuffers/protobuf/main
@@ -1 +1 @@
-Subproject commit bbf52275dbad317bad3421f3c69b5f3759eb2b23
+Subproject commit c879cccf0d740af2e2a2a779a8384d23f544eabe
diff --git a/libs/injective-query/.eslintignore b/libs/injective-query/.eslintignore
new file mode 100644
index 00000000..838458f2
--- /dev/null
+++ b/libs/injective-query/.eslintignore
@@ -0,0 +1 @@
+/dist/
\ No newline at end of file
diff --git a/libs/injective-query/CHANGELOG.md b/libs/injective-query/CHANGELOG.md
new file mode 100644
index 00000000..c7519894
--- /dev/null
+++ b/libs/injective-query/CHANGELOG.md
@@ -0,0 +1,176 @@
+# Change Log
+
+All notable changes to this project will be documented in this file.
+See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+
+## [0.0.1-beta.36](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.35...interchainjs@0.0.1-beta.36) (2024-11-04)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.35](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.34...interchainjs@0.0.1-beta.35) (2024-11-04)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.34](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.33...interchainjs@0.0.1-beta.34) (2024-11-01)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.33](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-alpha.33...interchainjs@0.0.1-beta.33) (2024-11-01)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-alpha.33](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-alpha.32...interchainjs@0.0.1-alpha.33) (2024-11-01)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-alpha.32](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-alpha.31...interchainjs@0.0.1-alpha.32) (2024-11-01)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-alpha.31](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-alpha.30...interchainjs@0.0.1-alpha.31) (2024-10-30)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-alpha.30](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.30...interchainjs@0.0.1-alpha.30) (2024-10-30)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.30](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.29...interchainjs@0.0.1-beta.30) (2024-10-25)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.29](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.28...interchainjs@0.0.1-beta.29) (2024-10-25)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.28](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.27...interchainjs@0.0.1-beta.28) (2024-10-25)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.27](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.26...interchainjs@0.0.1-beta.27) (2024-10-23)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.26](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.25...interchainjs@0.0.1-beta.26) (2024-10-22)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.25](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.24...interchainjs@0.0.1-beta.25) (2024-10-22)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.24](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.23...interchainjs@0.0.1-beta.24) (2024-10-22)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.23](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.22...interchainjs@0.0.1-beta.23) (2024-10-22)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.22](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.21...interchainjs@0.0.1-beta.22) (2024-10-22)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.21](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.20...interchainjs@0.0.1-beta.21) (2024-10-21)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.20](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.19...interchainjs@0.0.1-beta.20) (2024-10-21)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.19](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.18...interchainjs@0.0.1-beta.19) (2024-10-21)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.18](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.17...interchainjs@0.0.1-beta.18) (2024-10-21)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.17](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.16...interchainjs@0.0.1-beta.17) (2024-10-21)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.16](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.15...interchainjs@0.0.1-beta.16) (2024-10-21)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.15](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.14...interchainjs@0.0.1-beta.15) (2024-10-21)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.14](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.13...interchainjs@0.0.1-beta.14) (2024-09-13)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.13](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.12...interchainjs@0.0.1-beta.13) (2024-09-10)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.12](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.11...interchainjs@0.0.1-beta.12) (2024-08-30)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.11](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.10...interchainjs@0.0.1-beta.11) (2024-08-27)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.10](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.9...interchainjs@0.0.1-beta.10) (2024-08-26)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.9](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.8...interchainjs@0.0.1-beta.9) (2024-08-24)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.8](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.7...interchainjs@0.0.1-beta.8) (2024-08-21)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.7](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.6...interchainjs@0.0.1-beta.7) (2024-08-19)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.6](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.5...interchainjs@0.0.1-beta.6) (2024-08-14)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.5](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.4...interchainjs@0.0.1-beta.5) (2024-08-14)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.4](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.3...interchainjs@0.0.1-beta.4) (2024-08-13)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.3](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.2...interchainjs@0.0.1-beta.3) (2024-08-13)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.2](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.1...interchainjs@0.0.1-beta.2) (2024-06-07)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.1](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1-beta.0...interchainjs@0.0.1-beta.1) (2024-04-29)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1-beta.0](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1...interchainjs@0.0.1-beta.0) (2024-04-29)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1...interchainjs@0.0.1) (2024-04-29)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.1...interchainjs@0.0.1) (2024-04-29)
+
+**Note:** Version bump only for package interchainjs
+
+## [0.0.1](https://github.com/cosmology-tech/interchainjs/compare/interchainjs@0.0.7...interchainjs@0.0.1) (2024-04-29)
+
+**Note:** Version bump only for package interchainjs
+
+## 0.0.7 (2024-04-02)
+
+**Note:** Version bump only for package interchainjs
diff --git a/libs/injective-query/README.md b/libs/injective-query/README.md
new file mode 100644
index 00000000..7e697b67
--- /dev/null
+++ b/libs/injective-query/README.md
@@ -0,0 +1,21 @@
+# interchainjs
+
+
+
+
+
+
+
+
+
+
+
+Functionalities(Tx, Query) generated by Telescope.
+
+## License
+
+MIT License (MIT) & Apache License
+
+Copyright (c) 2024 Cosmology (https://cosmology.zone/)
diff --git a/libs/injective-query/jest.starship.config.js b/libs/injective-query/jest.starship.config.js
new file mode 100644
index 00000000..c8558038
--- /dev/null
+++ b/libs/injective-query/jest.starship.config.js
@@ -0,0 +1,18 @@
+/** @type {import('ts-jest').JestConfigWithTsJest} */
+module.exports = {
+ testTimeout: 15000,
+ preset: 'ts-jest',
+ testEnvironment: 'node',
+ transform: {
+ '^.+\\.tsx?$': [
+ 'ts-jest',
+ {
+ babelConfig: false,
+ tsconfig: 'tsconfig.json',
+ },
+ ],
+ },
+ transformIgnorePatterns: [`/node_modules/*`],
+ testRegex: '(/starship/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
+};
diff --git a/libs/injective-query/package.json b/libs/injective-query/package.json
new file mode 100644
index 00000000..23a16249
--- /dev/null
+++ b/libs/injective-query/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "injective-query",
+ "version": "0.0.1-beta.36",
+ "description": "Injective-query is a JavaScript library providing react query hooks for interacting with injective sdk.",
+ "main": "index.js",
+ "module": "esm/index.js",
+ "types": "index.d.ts",
+ "author": "Cosmology ",
+ "homepage": "https://github.com/cosmology-tech/interchainjs",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/cosmology-tech/interchainjs"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public",
+ "directory": "dist"
+ },
+ "scripts": {
+ "copy": "copyfiles -f ../../LICENSE-MIT ../../LICENSE-Apache README.md package.json dist",
+ "clean": "rimraf dist/**",
+ "build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
+ "build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
+ "lint": "eslint . --fix",
+ "prepare": "npm run build"
+ },
+ "dependencies": {
+ "@interchainjs/cosmos": "^0.0.1-beta.34",
+ "@interchainjs/cosmos-types": "^0.0.1-beta.34",
+ "@interchainjs/types": "^0.0.1-beta.34",
+ "@interchainjs/utils": "^0.0.1-beta.34",
+ "@noble/hashes": "^1.3.1",
+ "decimal.js": "^10.4.3"
+ },
+ "devDependencies": {
+ "@tanstack/react-query": "4.29.1"
+ },
+ "peerDependencies": {
+ "@tanstack/react-query": "4.29.1"
+ },
+ "keywords": [
+ "cosmos",
+ "blockchain",
+ "transaction",
+ "cosmjs",
+ "wallet"
+ ]
+}
diff --git a/libs/injective-query/src/amino/amino.ts b/libs/injective-query/src/amino/amino.ts
new file mode 100644
index 00000000..693da49f
--- /dev/null
+++ b/libs/injective-query/src/amino/amino.ts
@@ -0,0 +1 @@
+export {}
\ No newline at end of file
diff --git a/libs/injective-query/src/binary.ts b/libs/injective-query/src/binary.ts
new file mode 100644
index 00000000..1f9d1f8c
--- /dev/null
+++ b/libs/injective-query/src/binary.ts
@@ -0,0 +1,534 @@
+/**
+* This file and any referenced files were automatically generated by @cosmology/telescope@1.10.10
+* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain
+* and run the transpile command or npm scripts command that is used to regenerate this bundle.
+*/
+
+
+// Copyright (c) 2016, Daniel Wirtz All rights reserved.
+
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of its author, nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+
+// Code generated by the command line utilities is owned by the owner
+// of the input file used when generating it. This code is not
+// standalone and requires a support library to be linked with it. This
+// support library is itself covered by the above license.
+
+import { utf8Length, utf8Read, utf8Write } from "./utf8";
+import {
+ int64ToString,
+ readInt32,
+ readUInt32,
+ uInt64ToString,
+ varint32read,
+ varint64read,
+ writeVarint32,
+ writeVarint64,
+ int64FromString,
+ int64Length,
+ writeFixed32,
+ writeByte,
+ zzDecode,
+ zzEncode,
+} from "./varint";
+
+export enum WireType {
+ Varint = 0,
+
+ Fixed64 = 1,
+
+ Bytes = 2,
+
+ Fixed32 = 5,
+}
+
+// Reader
+export interface IBinaryReader {
+ buf: Uint8Array;
+ pos: number;
+ type: number;
+ len: number;
+ tag(): [number, WireType, number];
+ skip(length?: number): this;
+ skipType(wireType: number): this;
+ uint32(): number;
+ int32(): number;
+ sint32(): number;
+ fixed32(): number;
+ sfixed32(): number;
+ int64(): bigint;
+ uint64(): bigint;
+ sint64(): bigint;
+ fixed64(): bigint;
+ sfixed64(): bigint;
+ float(): number;
+ double(): number;
+ bool(): boolean;
+ bytes(): Uint8Array;
+ string(): string;
+}
+
+export class BinaryReader implements IBinaryReader {
+ buf: Uint8Array;
+ pos: number;
+ type: number;
+ len: number;
+
+ assertBounds(): void {
+ if (this.pos > this.len) throw new RangeError("premature EOF");
+ }
+
+ constructor(buf?: ArrayLike) {
+ this.buf = buf ? new Uint8Array(buf) : new Uint8Array(0);
+ this.pos = 0;
+ this.type = 0;
+ this.len = this.buf.length;
+ }
+
+ tag(): [number, WireType, number] {
+ const tag = this.uint32(),
+ fieldNo = tag >>> 3,
+ wireType = tag & 7;
+ if (fieldNo <= 0 || wireType < 0 || wireType > 5)
+ throw new Error(
+ "illegal tag: field no " + fieldNo + " wire type " + wireType
+ );
+ return [fieldNo, wireType, tag];
+ }
+
+ skip(length?: number) {
+ if (typeof length === "number") {
+ if (this.pos + length > this.len) throw indexOutOfRange(this, length);
+ this.pos += length;
+ } else {
+ do {
+ if (this.pos >= this.len) throw indexOutOfRange(this);
+ } while (this.buf[this.pos++] & 128);
+ }
+ return this;
+ }
+
+ skipType(wireType: number) {
+ switch (wireType) {
+ case WireType.Varint:
+ this.skip();
+ break;
+ case WireType.Fixed64:
+ this.skip(8);
+ break;
+ case WireType.Bytes:
+ this.skip(this.uint32());
+ break;
+ case 3:
+ while ((wireType = this.uint32() & 7) !== 4) {
+ this.skipType(wireType);
+ }
+ break;
+ case WireType.Fixed32:
+ this.skip(4);
+ break;
+
+ /* istanbul ignore next */
+ default:
+ throw Error("invalid wire type " + wireType + " at offset " + this.pos);
+ }
+ return this;
+ }
+
+ uint32(): number {
+ return varint32read.bind(this)();
+ }
+
+ int32(): number {
+ return this.uint32() | 0;
+ }
+
+ sint32(): number {
+ const num = this.uint32();
+ return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding
+ }
+
+ fixed32(): number {
+ const val = readUInt32(this.buf, this.pos);
+ this.pos += 4;
+ return val;
+ }
+
+ sfixed32(): number {
+ const val = readInt32(this.buf, this.pos);
+ this.pos += 4;
+ return val;
+ }
+
+ int64(): bigint {
+ const [lo, hi] = varint64read.bind(this)();
+ return BigInt(int64ToString(lo, hi));
+ }
+
+ uint64(): bigint {
+ const [lo, hi] = varint64read.bind(this)();
+ return BigInt(uInt64ToString(lo, hi));
+ }
+
+ sint64(): bigint {
+ let [lo, hi] = varint64read.bind(this)();
+ // zig zag
+ [lo, hi] = zzDecode(lo, hi);
+ return BigInt(int64ToString(lo, hi));
+ }
+
+ fixed64(): bigint {
+ const lo = this.sfixed32();
+ const hi = this.sfixed32();
+ return BigInt(uInt64ToString(lo, hi));
+ }
+ sfixed64(): bigint {
+ const lo = this.sfixed32();
+ const hi = this.sfixed32();
+ return BigInt(int64ToString(lo, hi));
+ }
+
+ float(): number {
+ throw new Error("float not supported");
+ }
+
+ double(): number {
+ throw new Error("double not supported");
+ }
+
+ bool(): boolean {
+ const [lo, hi] = varint64read.bind(this)();
+ return lo !== 0 || hi !== 0;
+ }
+
+ bytes(): Uint8Array {
+ const len = this.uint32(),
+ start = this.pos;
+ this.pos += len;
+ this.assertBounds();
+ return this.buf.subarray(start, start + len);
+ }
+
+ string(): string {
+ const bytes = this.bytes();
+ return utf8Read(bytes, 0, bytes.length);
+ }
+}
+
+// Writer
+export interface IBinaryWriter {
+ len: number;
+ head: IOp;
+ tail: IOp;
+ states: State | null;
+ finish(): Uint8Array;
+ fork(): IBinaryWriter;
+ reset(): IBinaryWriter;
+ ldelim(): IBinaryWriter;
+ tag(fieldNo: number, type: WireType): IBinaryWriter;
+ uint32(value: number): IBinaryWriter;
+ int32(value: number): IBinaryWriter;
+ sint32(value: number): IBinaryWriter;
+ int64(value: string | number | bigint): IBinaryWriter;
+ uint64: (value: string | number | bigint) => IBinaryWriter;
+ sint64(value: string | number | bigint): IBinaryWriter;
+ fixed64(value: string | number | bigint): IBinaryWriter;
+ sfixed64: (value: string | number | bigint) => IBinaryWriter;
+ bool(value: boolean): IBinaryWriter;
+ fixed32(value: number): IBinaryWriter;
+ sfixed32: (value: number) => IBinaryWriter;
+ float(value: number): IBinaryWriter;
+ double(value: number): IBinaryWriter;
+ bytes(value: Uint8Array): IBinaryWriter;
+ string(value: string): IBinaryWriter;
+}
+
+interface IOp {
+ len: number;
+ next?: IOp;
+ proceed(buf: Uint8Array | number[], pos: number): void;
+}
+
+class Op implements IOp {
+ fn?: ((val: T, buf: Uint8Array | number[], pos: number) => void) | null;
+ len: number;
+ val: T;
+ next?: IOp;
+
+ constructor(
+ fn:
+ | ((
+ val: T,
+ buf: Uint8Array | number[],
+ pos: number
+ ) => void | undefined | null)
+ | null,
+ len: number,
+ val: T
+ ) {
+ this.fn = fn;
+ this.len = len;
+ this.val = val;
+ }
+
+ proceed(buf: Uint8Array | number[], pos: number) {
+ if (this.fn) {
+ this.fn(this.val, buf, pos);
+ }
+ }
+}
+
+class State {
+ head: IOp;
+ tail: IOp;
+ len: number;
+ next: State | null;
+
+ constructor(writer: BinaryWriter) {
+ this.head = writer.head;
+ this.tail = writer.tail;
+ this.len = writer.len;
+ this.next = writer.states;
+ }
+}
+
+export class BinaryWriter implements IBinaryWriter {
+ len = 0;
+ head: IOp;
+ tail: IOp;
+ states: State | null;
+
+ constructor() {
+ this.head = new Op(null, 0, 0);
+ this.tail = this.head;
+ this.states = null;
+ }
+
+ static create() {
+ return new BinaryWriter();
+ }
+
+ static alloc(size: number): Uint8Array | number[] {
+ if (typeof Uint8Array !== "undefined") {
+ return pool(
+ (size) => new Uint8Array(size),
+ Uint8Array.prototype.subarray
+ )(size);
+ } else {
+ return new Array(size);
+ }
+ }
+
+ private _push(
+ fn: (val: T, buf: Uint8Array | number[], pos: number) => void,
+ len: number,
+ val: T
+ ) {
+ this.tail = this.tail.next = new Op(fn, len, val);
+ this.len += len;
+ return this;
+ }
+
+ finish(): Uint8Array {
+ let head = this.head.next,
+ pos = 0;
+ const buf = BinaryWriter.alloc(this.len);
+ while (head) {
+ head.proceed(buf, pos);
+ pos += head.len;
+ head = head.next;
+ }
+ return buf as Uint8Array;
+ }
+
+ fork(): BinaryWriter {
+ this.states = new State(this);
+ this.head = this.tail = new Op(null, 0, 0);
+ this.len = 0;
+ return this;
+ }
+
+ reset(): BinaryWriter {
+ if (this.states) {
+ this.head = this.states.head;
+ this.tail = this.states.tail;
+ this.len = this.states.len;
+ this.states = this.states.next;
+ } else {
+ this.head = this.tail = new Op(null, 0, 0);
+ this.len = 0;
+ }
+ return this;
+ }
+
+ ldelim(): BinaryWriter {
+ const head = this.head,
+ tail = this.tail,
+ len = this.len;
+ this.reset().uint32(len);
+ if (len) {
+ this.tail.next = head.next; // skip noop
+ this.tail = tail;
+ this.len += len;
+ }
+ return this;
+ }
+
+ tag(fieldNo: number, type: WireType): BinaryWriter {
+ return this.uint32(((fieldNo << 3) | type) >>> 0);
+ }
+
+ uint32(value: number): BinaryWriter {
+ this.len += (this.tail = this.tail.next =
+ new Op(
+ writeVarint32,
+ (value = value >>> 0) < 128
+ ? 1
+ : value < 16384
+ ? 2
+ : value < 2097152
+ ? 3
+ : value < 268435456
+ ? 4
+ : 5,
+ value
+ )).len;
+ return this;
+ }
+
+ int32(value: number): BinaryWriter {
+ return value < 0
+ ? this._push(writeVarint64, 10, int64FromString(value.toString())) // 10 bytes per spec
+ : this.uint32(value);
+ }
+
+ sint32(value: number): BinaryWriter {
+ return this.uint32(((value << 1) ^ (value >> 31)) >>> 0);
+ }
+
+ int64(value: string | number | bigint): BinaryWriter {
+ const { lo, hi } = int64FromString(value.toString());
+ return this._push(writeVarint64, int64Length(lo, hi), { lo, hi });
+ }
+
+ // uint64 is the same with int64
+ uint64 = BinaryWriter.prototype.int64;
+
+ sint64(value: string | number | bigint): BinaryWriter {
+ let { lo, hi } = int64FromString(value.toString());
+ // zig zag
+ [lo, hi] = zzEncode(lo, hi);
+ return this._push(writeVarint64, int64Length(lo, hi), { lo, hi });
+ }
+
+ fixed64(value: string | number | bigint): BinaryWriter {
+ const { lo, hi } = int64FromString(value.toString());
+ return this._push(writeFixed32, 4, lo)._push(writeFixed32, 4, hi);
+ }
+
+ // sfixed64 is the same with fixed64
+ sfixed64 = BinaryWriter.prototype.fixed64;
+
+ bool(value: boolean): BinaryWriter {
+ return this._push(writeByte, 1, value ? 1 : 0);
+ }
+
+ fixed32(value: number): BinaryWriter {
+ return this._push(writeFixed32, 4, value >>> 0);
+ }
+
+ // sfixed32 is the same with fixed32
+ sfixed32 = BinaryWriter.prototype.fixed32;
+
+ float(value: number): BinaryWriter {
+ throw new Error("float not supported" + value);
+ }
+
+ double(value: number): BinaryWriter {
+ throw new Error("double not supported" + value);
+ }
+
+ bytes(value: Uint8Array): BinaryWriter {
+ const len = value.length >>> 0;
+ if (!len) return this._push(writeByte, 1, 0);
+ return this.uint32(len)._push(writeBytes, len, value);
+ }
+
+ string(value: string): BinaryWriter {
+ const len = utf8Length(value);
+ return len
+ ? this.uint32(len)._push(utf8Write, len, value)
+ : this._push(writeByte, 1, 0);
+ }
+}
+
+function writeBytes(
+ val: Uint8Array | number[],
+ buf: Uint8Array | number[],
+ pos: number
+) {
+ if (typeof Uint8Array !== "undefined") {
+ (buf as Uint8Array).set(val, pos);
+ } else {
+ for (let i = 0; i < val.length; ++i) buf[pos + i] = val[i];
+ }
+}
+
+function pool(
+ alloc: (size: number) => Uint8Array,
+ slice: (begin?: number, end?: number) => Uint8Array,
+ size?: number
+): (size: number) => Uint8Array {
+ const SIZE = size || 8192;
+ const MAX = SIZE >>> 1;
+ let slab: Uint8Array | null = null;
+ let offset = SIZE;
+ return function pool_alloc(size): Uint8Array {
+ if (size < 1 || size > MAX) return alloc(size);
+ if (offset + size > SIZE) {
+ slab = alloc(SIZE);
+ offset = 0;
+ }
+ const buf: Uint8Array = slice.call(slab, offset, (offset += size));
+ if (offset & 7)
+ // align to 32 bit
+ offset = (offset | 7) + 1;
+ return buf;
+ };
+}
+
+function indexOutOfRange(reader: BinaryReader, writeLength?: number) {
+ return RangeError(
+ "index out of range: " +
+ reader.pos +
+ " + " +
+ (writeLength || 1) +
+ " > " +
+ reader.len
+ );
+}
diff --git a/libs/injective-query/src/cosmos/auth/v1beta1/auth.ts b/libs/injective-query/src/cosmos/auth/v1beta1/auth.ts
new file mode 100644
index 00000000..bd8ed990
--- /dev/null
+++ b/libs/injective-query/src/cosmos/auth/v1beta1/auth.ts
@@ -0,0 +1,550 @@
+import { Any, AnyAmino } from "../../../google/protobuf/any";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
+import { GlobalDecoderRegistry } from "../../../registry";
+/**
+ * BaseAccount defines a base account type. It contains all the necessary fields
+ * for basic account functionality. Any custom account type should extend this
+ * type for additional functionality (e.g. vesting).
+ */
+export interface BaseAccount {
+ address: string;
+ pubKey?: Any;
+ accountNumber: bigint;
+ sequence: bigint;
+}
+export interface BaseAccountProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.BaseAccount";
+ value: Uint8Array;
+}
+/**
+ * BaseAccount defines a base account type. It contains all the necessary fields
+ * for basic account functionality. Any custom account type should extend this
+ * type for additional functionality (e.g. vesting).
+ */
+export interface BaseAccountAmino {
+ address: string;
+ pub_key?: AnyAmino;
+ account_number: string;
+ sequence: string;
+}
+export interface BaseAccountAminoMsg {
+ type: "cosmos-sdk/BaseAccount";
+ value: BaseAccountAmino;
+}
+/** ModuleAccount defines an account for modules that holds coins on a pool. */
+export interface ModuleAccount {
+ baseAccount?: BaseAccount;
+ name: string;
+ permissions: string[];
+}
+export interface ModuleAccountProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleAccount";
+ value: Uint8Array;
+}
+/** ModuleAccount defines an account for modules that holds coins on a pool. */
+export interface ModuleAccountAmino {
+ base_account?: BaseAccountAmino;
+ name: string;
+ permissions: string[];
+}
+export interface ModuleAccountAminoMsg {
+ type: "cosmos-sdk/ModuleAccount";
+ value: ModuleAccountAmino;
+}
+/**
+ * ModuleCredential represents a unclaimable pubkey for base accounts controlled by modules.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface ModuleCredential {
+ /** module_name is the name of the module used for address derivation (passed into address.Module). */
+ moduleName: string;
+ /**
+ * derivation_keys is for deriving a module account address (passed into address.Module)
+ * adding more keys creates sub-account addresses (passed into address.Derive)
+ */
+ derivationKeys: Uint8Array[];
+}
+export interface ModuleCredentialProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleCredential";
+ value: Uint8Array;
+}
+/**
+ * ModuleCredential represents a unclaimable pubkey for base accounts controlled by modules.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface ModuleCredentialAmino {
+ /** module_name is the name of the module used for address derivation (passed into address.Module). */
+ module_name: string;
+ /**
+ * derivation_keys is for deriving a module account address (passed into address.Module)
+ * adding more keys creates sub-account addresses (passed into address.Derive)
+ */
+ derivation_keys: string[];
+}
+export interface ModuleCredentialAminoMsg {
+ type: "cosmos-sdk/GroupAccountCredential";
+ value: ModuleCredentialAmino;
+}
+/** Params defines the parameters for the auth module. */
+export interface Params {
+ maxMemoCharacters: bigint;
+ txSigLimit: bigint;
+ txSizeCostPerByte: bigint;
+ sigVerifyCostEd25519: bigint;
+ sigVerifyCostSecp256k1: bigint;
+}
+export interface ParamsProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.Params";
+ value: Uint8Array;
+}
+/** Params defines the parameters for the auth module. */
+export interface ParamsAmino {
+ max_memo_characters: string;
+ tx_sig_limit: string;
+ tx_size_cost_per_byte: string;
+ sig_verify_cost_ed25519: string;
+ sig_verify_cost_secp256k1: string;
+}
+export interface ParamsAminoMsg {
+ type: "cosmos-sdk/x/auth/Params";
+ value: ParamsAmino;
+}
+function createBaseBaseAccount(): BaseAccount {
+ return {
+ address: "",
+ pubKey: undefined,
+ accountNumber: BigInt(0),
+ sequence: BigInt(0)
+ };
+}
+export const BaseAccount = {
+ typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
+ aminoType: "cosmos-sdk/BaseAccount",
+ is(o: any): o is BaseAccount {
+ return o && (o.$typeUrl === BaseAccount.typeUrl || typeof o.address === "string" && typeof o.accountNumber === "bigint" && typeof o.sequence === "bigint");
+ },
+ isAmino(o: any): o is BaseAccountAmino {
+ return o && (o.$typeUrl === BaseAccount.typeUrl || typeof o.address === "string" && typeof o.account_number === "bigint" && typeof o.sequence === "bigint");
+ },
+ encode(message: BaseAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.address !== "") {
+ writer.uint32(10).string(message.address);
+ }
+ if (message.pubKey !== undefined) {
+ Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim();
+ }
+ if (message.accountNumber !== BigInt(0)) {
+ writer.uint32(24).uint64(message.accountNumber);
+ }
+ if (message.sequence !== BigInt(0)) {
+ writer.uint32(32).uint64(message.sequence);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): BaseAccount {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseBaseAccount();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.address = reader.string();
+ break;
+ case 2:
+ message.pubKey = 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;
+ },
+ fromPartial(object: DeepPartial): BaseAccount {
+ const message = createBaseBaseAccount();
+ message.address = object.address ?? "";
+ message.pubKey = object.pubKey !== undefined && object.pubKey !== null ? Any.fromPartial(object.pubKey) : undefined;
+ message.accountNumber = object.accountNumber !== undefined && object.accountNumber !== null ? BigInt(object.accountNumber.toString()) : BigInt(0);
+ message.sequence = object.sequence !== undefined && object.sequence !== null ? BigInt(object.sequence.toString()) : BigInt(0);
+ return message;
+ },
+ fromAmino(object: BaseAccountAmino): BaseAccount {
+ const message = createBaseBaseAccount();
+ if (object.address !== undefined && object.address !== null) {
+ message.address = object.address;
+ }
+ if (object.pub_key !== undefined && object.pub_key !== null) {
+ message.pubKey = Any.fromAmino(object.pub_key);
+ }
+ if (object.account_number !== undefined && object.account_number !== null) {
+ message.accountNumber = BigInt(object.account_number);
+ }
+ if (object.sequence !== undefined && object.sequence !== null) {
+ message.sequence = BigInt(object.sequence);
+ }
+ return message;
+ },
+ toAmino(message: BaseAccount): BaseAccountAmino {
+ const obj: any = {};
+ obj.address = message.address === "" ? undefined : message.address;
+ obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey) : undefined;
+ obj.account_number = message.accountNumber !== BigInt(0) ? message.accountNumber?.toString() : undefined;
+ obj.sequence = message.sequence !== BigInt(0) ? message.sequence?.toString() : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: BaseAccountAminoMsg): BaseAccount {
+ return BaseAccount.fromAmino(object.value);
+ },
+ toAminoMsg(message: BaseAccount): BaseAccountAminoMsg {
+ return {
+ type: "cosmos-sdk/BaseAccount",
+ value: BaseAccount.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: BaseAccountProtoMsg): BaseAccount {
+ return BaseAccount.decode(message.value);
+ },
+ toProto(message: BaseAccount): Uint8Array {
+ return BaseAccount.encode(message).finish();
+ },
+ toProtoMsg(message: BaseAccount): BaseAccountProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
+ value: BaseAccount.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(BaseAccount.typeUrl, BaseAccount);
+GlobalDecoderRegistry.registerAminoProtoMapping(BaseAccount.aminoType, BaseAccount.typeUrl);
+function createBaseModuleAccount(): ModuleAccount {
+ return {
+ baseAccount: undefined,
+ name: "",
+ permissions: []
+ };
+}
+export const ModuleAccount = {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleAccount",
+ aminoType: "cosmos-sdk/ModuleAccount",
+ is(o: any): o is ModuleAccount {
+ return o && (o.$typeUrl === ModuleAccount.typeUrl || typeof o.name === "string" && Array.isArray(o.permissions) && (!o.permissions.length || typeof o.permissions[0] === "string"));
+ },
+ isAmino(o: any): o is ModuleAccountAmino {
+ return o && (o.$typeUrl === ModuleAccount.typeUrl || typeof o.name === "string" && Array.isArray(o.permissions) && (!o.permissions.length || typeof o.permissions[0] === "string"));
+ },
+ encode(message: ModuleAccount, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.baseAccount !== undefined) {
+ BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.name !== "") {
+ writer.uint32(18).string(message.name);
+ }
+ for (const v of message.permissions) {
+ writer.uint32(26).string(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): ModuleAccount {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseModuleAccount();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.baseAccount = BaseAccount.decode(reader, reader.uint32());
+ break;
+ case 2:
+ message.name = reader.string();
+ break;
+ case 3:
+ message.permissions.push(reader.string());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): ModuleAccount {
+ const message = createBaseModuleAccount();
+ message.baseAccount = object.baseAccount !== undefined && object.baseAccount !== null ? BaseAccount.fromPartial(object.baseAccount) : undefined;
+ message.name = object.name ?? "";
+ message.permissions = object.permissions?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: ModuleAccountAmino): ModuleAccount {
+ const message = createBaseModuleAccount();
+ if (object.base_account !== undefined && object.base_account !== null) {
+ message.baseAccount = BaseAccount.fromAmino(object.base_account);
+ }
+ if (object.name !== undefined && object.name !== null) {
+ message.name = object.name;
+ }
+ message.permissions = object.permissions?.map(e => e) || [];
+ return message;
+ },
+ toAmino(message: ModuleAccount): ModuleAccountAmino {
+ const obj: any = {};
+ obj.base_account = message.baseAccount ? BaseAccount.toAmino(message.baseAccount) : undefined;
+ obj.name = message.name === "" ? undefined : message.name;
+ if (message.permissions) {
+ obj.permissions = message.permissions.map(e => e);
+ } else {
+ obj.permissions = message.permissions;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: ModuleAccountAminoMsg): ModuleAccount {
+ return ModuleAccount.fromAmino(object.value);
+ },
+ toAminoMsg(message: ModuleAccount): ModuleAccountAminoMsg {
+ return {
+ type: "cosmos-sdk/ModuleAccount",
+ value: ModuleAccount.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleAccountProtoMsg): ModuleAccount {
+ return ModuleAccount.decode(message.value);
+ },
+ toProto(message: ModuleAccount): Uint8Array {
+ return ModuleAccount.encode(message).finish();
+ },
+ toProtoMsg(message: ModuleAccount): ModuleAccountProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleAccount",
+ value: ModuleAccount.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(ModuleAccount.typeUrl, ModuleAccount);
+GlobalDecoderRegistry.registerAminoProtoMapping(ModuleAccount.aminoType, ModuleAccount.typeUrl);
+function createBaseModuleCredential(): ModuleCredential {
+ return {
+ moduleName: "",
+ derivationKeys: []
+ };
+}
+export const ModuleCredential = {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleCredential",
+ aminoType: "cosmos-sdk/GroupAccountCredential",
+ is(o: any): o is ModuleCredential {
+ return o && (o.$typeUrl === ModuleCredential.typeUrl || typeof o.moduleName === "string" && Array.isArray(o.derivationKeys) && (!o.derivationKeys.length || o.derivationKeys[0] instanceof Uint8Array || typeof o.derivationKeys[0] === "string"));
+ },
+ isAmino(o: any): o is ModuleCredentialAmino {
+ return o && (o.$typeUrl === ModuleCredential.typeUrl || typeof o.module_name === "string" && Array.isArray(o.derivation_keys) && (!o.derivation_keys.length || o.derivation_keys[0] instanceof Uint8Array || typeof o.derivation_keys[0] === "string"));
+ },
+ encode(message: ModuleCredential, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.moduleName !== "") {
+ writer.uint32(10).string(message.moduleName);
+ }
+ for (const v of message.derivationKeys) {
+ writer.uint32(18).bytes(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): ModuleCredential {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseModuleCredential();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.moduleName = reader.string();
+ break;
+ case 2:
+ message.derivationKeys.push(reader.bytes());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): ModuleCredential {
+ const message = createBaseModuleCredential();
+ message.moduleName = object.moduleName ?? "";
+ message.derivationKeys = object.derivationKeys?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: ModuleCredentialAmino): ModuleCredential {
+ const message = createBaseModuleCredential();
+ if (object.module_name !== undefined && object.module_name !== null) {
+ message.moduleName = object.module_name;
+ }
+ message.derivationKeys = object.derivation_keys?.map(e => bytesFromBase64(e)) || [];
+ return message;
+ },
+ toAmino(message: ModuleCredential): ModuleCredentialAmino {
+ const obj: any = {};
+ obj.module_name = message.moduleName === "" ? undefined : message.moduleName;
+ if (message.derivationKeys) {
+ obj.derivation_keys = message.derivationKeys.map(e => base64FromBytes(e));
+ } else {
+ obj.derivation_keys = message.derivationKeys;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: ModuleCredentialAminoMsg): ModuleCredential {
+ return ModuleCredential.fromAmino(object.value);
+ },
+ toAminoMsg(message: ModuleCredential): ModuleCredentialAminoMsg {
+ return {
+ type: "cosmos-sdk/GroupAccountCredential",
+ value: ModuleCredential.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ModuleCredentialProtoMsg): ModuleCredential {
+ return ModuleCredential.decode(message.value);
+ },
+ toProto(message: ModuleCredential): Uint8Array {
+ return ModuleCredential.encode(message).finish();
+ },
+ toProtoMsg(message: ModuleCredential): ModuleCredentialProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.ModuleCredential",
+ value: ModuleCredential.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(ModuleCredential.typeUrl, ModuleCredential);
+GlobalDecoderRegistry.registerAminoProtoMapping(ModuleCredential.aminoType, ModuleCredential.typeUrl);
+function createBaseParams(): Params {
+ return {
+ maxMemoCharacters: BigInt(0),
+ txSigLimit: BigInt(0),
+ txSizeCostPerByte: BigInt(0),
+ sigVerifyCostEd25519: BigInt(0),
+ sigVerifyCostSecp256k1: BigInt(0)
+ };
+}
+export const Params = {
+ typeUrl: "/cosmos.auth.v1beta1.Params",
+ aminoType: "cosmos-sdk/x/auth/Params",
+ is(o: any): o is Params {
+ return o && (o.$typeUrl === Params.typeUrl || typeof o.maxMemoCharacters === "bigint" && typeof o.txSigLimit === "bigint" && typeof o.txSizeCostPerByte === "bigint" && typeof o.sigVerifyCostEd25519 === "bigint" && typeof o.sigVerifyCostSecp256k1 === "bigint");
+ },
+ isAmino(o: any): o is ParamsAmino {
+ return o && (o.$typeUrl === Params.typeUrl || typeof o.max_memo_characters === "bigint" && typeof o.tx_sig_limit === "bigint" && typeof o.tx_size_cost_per_byte === "bigint" && typeof o.sig_verify_cost_ed25519 === "bigint" && typeof o.sig_verify_cost_secp256k1 === "bigint");
+ },
+ encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.maxMemoCharacters !== BigInt(0)) {
+ writer.uint32(8).uint64(message.maxMemoCharacters);
+ }
+ if (message.txSigLimit !== BigInt(0)) {
+ writer.uint32(16).uint64(message.txSigLimit);
+ }
+ if (message.txSizeCostPerByte !== BigInt(0)) {
+ writer.uint32(24).uint64(message.txSizeCostPerByte);
+ }
+ if (message.sigVerifyCostEd25519 !== BigInt(0)) {
+ writer.uint32(32).uint64(message.sigVerifyCostEd25519);
+ }
+ if (message.sigVerifyCostSecp256k1 !== BigInt(0)) {
+ writer.uint32(40).uint64(message.sigVerifyCostSecp256k1);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Params {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseParams();
+ while (reader.pos < end) {
+ const 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;
+ },
+ fromPartial(object: DeepPartial): Params {
+ const message = createBaseParams();
+ message.maxMemoCharacters = object.maxMemoCharacters !== undefined && object.maxMemoCharacters !== null ? BigInt(object.maxMemoCharacters.toString()) : BigInt(0);
+ message.txSigLimit = object.txSigLimit !== undefined && object.txSigLimit !== null ? BigInt(object.txSigLimit.toString()) : BigInt(0);
+ message.txSizeCostPerByte = object.txSizeCostPerByte !== undefined && object.txSizeCostPerByte !== null ? BigInt(object.txSizeCostPerByte.toString()) : BigInt(0);
+ message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519 !== undefined && object.sigVerifyCostEd25519 !== null ? BigInt(object.sigVerifyCostEd25519.toString()) : BigInt(0);
+ message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1 !== undefined && object.sigVerifyCostSecp256k1 !== null ? BigInt(object.sigVerifyCostSecp256k1.toString()) : BigInt(0);
+ return message;
+ },
+ fromAmino(object: ParamsAmino): Params {
+ const message = createBaseParams();
+ if (object.max_memo_characters !== undefined && object.max_memo_characters !== null) {
+ message.maxMemoCharacters = BigInt(object.max_memo_characters);
+ }
+ if (object.tx_sig_limit !== undefined && object.tx_sig_limit !== null) {
+ message.txSigLimit = BigInt(object.tx_sig_limit);
+ }
+ if (object.tx_size_cost_per_byte !== undefined && object.tx_size_cost_per_byte !== null) {
+ message.txSizeCostPerByte = BigInt(object.tx_size_cost_per_byte);
+ }
+ if (object.sig_verify_cost_ed25519 !== undefined && object.sig_verify_cost_ed25519 !== null) {
+ message.sigVerifyCostEd25519 = BigInt(object.sig_verify_cost_ed25519);
+ }
+ if (object.sig_verify_cost_secp256k1 !== undefined && object.sig_verify_cost_secp256k1 !== null) {
+ message.sigVerifyCostSecp256k1 = BigInt(object.sig_verify_cost_secp256k1);
+ }
+ return message;
+ },
+ toAmino(message: Params): ParamsAmino {
+ const obj: any = {};
+ obj.max_memo_characters = message.maxMemoCharacters !== BigInt(0) ? message.maxMemoCharacters?.toString() : undefined;
+ obj.tx_sig_limit = message.txSigLimit !== BigInt(0) ? message.txSigLimit?.toString() : undefined;
+ obj.tx_size_cost_per_byte = message.txSizeCostPerByte !== BigInt(0) ? message.txSizeCostPerByte?.toString() : undefined;
+ obj.sig_verify_cost_ed25519 = message.sigVerifyCostEd25519 !== BigInt(0) ? message.sigVerifyCostEd25519?.toString() : undefined;
+ obj.sig_verify_cost_secp256k1 = message.sigVerifyCostSecp256k1 !== BigInt(0) ? message.sigVerifyCostSecp256k1?.toString() : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: ParamsAminoMsg): Params {
+ return Params.fromAmino(object.value);
+ },
+ toAminoMsg(message: Params): ParamsAminoMsg {
+ return {
+ type: "cosmos-sdk/x/auth/Params",
+ value: Params.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ParamsProtoMsg): Params {
+ return Params.decode(message.value);
+ },
+ toProto(message: Params): Uint8Array {
+ return Params.encode(message).finish();
+ },
+ toProtoMsg(message: Params): ParamsProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.Params",
+ value: Params.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(Params.typeUrl, Params);
+GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl);
\ No newline at end of file
diff --git a/libs/injective-query/src/cosmos/auth/v1beta1/query.rpc.func.ts b/libs/injective-query/src/cosmos/auth/v1beta1/query.rpc.func.ts
new file mode 100644
index 00000000..55204af9
--- /dev/null
+++ b/libs/injective-query/src/cosmos/auth/v1beta1/query.rpc.func.ts
@@ -0,0 +1,113 @@
+import { RpcResolver, buildQuery } from "../../../helper-func-types";
+import { buildUseQuery } from "../../../react-query";
+import { QueryAccountsRequest, QueryAccountsResponse, QueryAccountRequest, QueryAccountResponse, QueryAccountAddressByIDRequest, QueryAccountAddressByIDResponse, QueryParamsRequest, QueryParamsResponse, QueryModuleAccountsRequest, QueryModuleAccountsResponse, QueryModuleAccountByNameRequest, QueryModuleAccountByNameResponse, Bech32PrefixRequest, Bech32PrefixResponse, AddressBytesToStringRequest, AddressBytesToStringResponse, AddressStringToBytesRequest, AddressStringToBytesResponse, QueryAccountInfoRequest, QueryAccountInfoResponse } from "./query";
+export const createGetAccounts = (clientResolver?: RpcResolver) => buildQuery({
+ encode: QueryAccountsRequest.encode,
+ decode: QueryAccountsResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "Accounts",
+ clientResolver
+});
+export const useGetAccounts = buildUseQuery({
+ builderQueryFn: createGetAccounts,
+ queryKeyPrefix: "AccountsQuery"
+});
+export const createGetAccount = (clientResolver?: RpcResolver) => buildQuery({
+ encode: QueryAccountRequest.encode,
+ decode: QueryAccountResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "Account",
+ clientResolver
+});
+export const useGetAccount = buildUseQuery({
+ builderQueryFn: createGetAccount,
+ queryKeyPrefix: "AccountQuery"
+});
+export const createGetAccountAddressByID = (clientResolver?: RpcResolver) => buildQuery({
+ encode: QueryAccountAddressByIDRequest.encode,
+ decode: QueryAccountAddressByIDResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "AccountAddressByID",
+ clientResolver
+});
+export const useGetAccountAddressByID = buildUseQuery({
+ builderQueryFn: createGetAccountAddressByID,
+ queryKeyPrefix: "AccountAddressByIDQuery"
+});
+export const createGetParams = (clientResolver?: RpcResolver) => buildQuery({
+ encode: QueryParamsRequest.encode,
+ decode: QueryParamsResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "Params",
+ clientResolver
+});
+export const useGetParams = buildUseQuery({
+ builderQueryFn: createGetParams,
+ queryKeyPrefix: "ParamsQuery"
+});
+export const createGetModuleAccounts = (clientResolver?: RpcResolver) => buildQuery({
+ encode: QueryModuleAccountsRequest.encode,
+ decode: QueryModuleAccountsResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "ModuleAccounts",
+ clientResolver
+});
+export const useGetModuleAccounts = buildUseQuery({
+ builderQueryFn: createGetModuleAccounts,
+ queryKeyPrefix: "ModuleAccountsQuery"
+});
+export const createGetModuleAccountByName = (clientResolver?: RpcResolver) => buildQuery({
+ encode: QueryModuleAccountByNameRequest.encode,
+ decode: QueryModuleAccountByNameResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "ModuleAccountByName",
+ clientResolver
+});
+export const useGetModuleAccountByName = buildUseQuery({
+ builderQueryFn: createGetModuleAccountByName,
+ queryKeyPrefix: "ModuleAccountByNameQuery"
+});
+export const createGetBech32Prefix = (clientResolver?: RpcResolver) => buildQuery({
+ encode: Bech32PrefixRequest.encode,
+ decode: Bech32PrefixResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "Bech32Prefix",
+ clientResolver
+});
+export const useGetBech32Prefix = buildUseQuery({
+ builderQueryFn: createGetBech32Prefix,
+ queryKeyPrefix: "Bech32PrefixQuery"
+});
+export const createGetAddressBytesToString = (clientResolver?: RpcResolver) => buildQuery({
+ encode: AddressBytesToStringRequest.encode,
+ decode: AddressBytesToStringResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "AddressBytesToString",
+ clientResolver
+});
+export const useGetAddressBytesToString = buildUseQuery({
+ builderQueryFn: createGetAddressBytesToString,
+ queryKeyPrefix: "AddressBytesToStringQuery"
+});
+export const createGetAddressStringToBytes = (clientResolver?: RpcResolver) => buildQuery({
+ encode: AddressStringToBytesRequest.encode,
+ decode: AddressStringToBytesResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "AddressStringToBytes",
+ clientResolver
+});
+export const useGetAddressStringToBytes = buildUseQuery({
+ builderQueryFn: createGetAddressStringToBytes,
+ queryKeyPrefix: "AddressStringToBytesQuery"
+});
+export const createGetAccountInfo = (clientResolver?: RpcResolver) => buildQuery({
+ encode: QueryAccountInfoRequest.encode,
+ decode: QueryAccountInfoResponse.decode,
+ service: "cosmos.auth.v1beta1.Query",
+ method: "AccountInfo",
+ clientResolver
+});
+export const useGetAccountInfo = buildUseQuery({
+ builderQueryFn: createGetAccountInfo,
+ queryKeyPrefix: "AccountInfoQuery"
+});
\ No newline at end of file
diff --git a/libs/injective-query/src/cosmos/auth/v1beta1/query.ts b/libs/injective-query/src/cosmos/auth/v1beta1/query.ts
new file mode 100644
index 00000000..13eb3d8e
--- /dev/null
+++ b/libs/injective-query/src/cosmos/auth/v1beta1/query.ts
@@ -0,0 +1,2034 @@
+import { PageRequest, PageRequestAmino, PageResponse, PageResponseAmino } from "../../base/query/v1beta1/pagination";
+import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any";
+import { Params, ParamsAmino, BaseAccount, BaseAccountProtoMsg, BaseAccountAmino, ModuleAccount, ModuleAccountProtoMsg } from "./auth";
+import { EthAccount, EthAccountProtoMsg } from "../../../injective/types/v1beta1/account";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
+import { GlobalDecoderRegistry } from "../../../registry";
+/**
+ * QueryAccountsRequest is the request type for the Query/Accounts RPC method.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface QueryAccountsRequest {
+ /** pagination defines an optional pagination for the request. */
+ pagination?: PageRequest;
+}
+export interface QueryAccountsRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountsRequest is the request type for the Query/Accounts RPC method.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface QueryAccountsRequestAmino {
+ /** pagination defines an optional pagination for the request. */
+ pagination?: PageRequestAmino;
+}
+export interface QueryAccountsRequestAminoMsg {
+ type: "cosmos-sdk/QueryAccountsRequest";
+ value: QueryAccountsRequestAmino;
+}
+/**
+ * QueryAccountsResponse is the response type for the Query/Accounts RPC method.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface QueryAccountsResponse {
+ /** accounts are the existing accounts */
+ accounts: (BaseAccount | EthAccount | Any)[] | Any[];
+ /** pagination defines the pagination in the response. */
+ pagination?: PageResponse;
+}
+export interface QueryAccountsResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse";
+ value: Uint8Array;
+}
+export type QueryAccountsResponseEncoded = Omit & {
+ /** accounts are the existing accounts */accounts: (BaseAccountProtoMsg | EthAccountProtoMsg | AnyProtoMsg)[];
+};
+/**
+ * QueryAccountsResponse is the response type for the Query/Accounts RPC method.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+export interface QueryAccountsResponseAmino {
+ /** accounts are the existing accounts */
+ accounts: AnyAmino[];
+ /** pagination defines the pagination in the response. */
+ pagination?: PageResponseAmino;
+}
+export interface QueryAccountsResponseAminoMsg {
+ type: "cosmos-sdk/QueryAccountsResponse";
+ value: QueryAccountsResponseAmino;
+}
+/** QueryAccountRequest is the request type for the Query/Account RPC method. */
+export interface QueryAccountRequest {
+ /** address defines the address to query for. */
+ address: string;
+}
+export interface QueryAccountRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest";
+ value: Uint8Array;
+}
+/** QueryAccountRequest is the request type for the Query/Account RPC method. */
+export interface QueryAccountRequestAmino {
+ /** address defines the address to query for. */
+ address: string;
+}
+export interface QueryAccountRequestAminoMsg {
+ type: "cosmos-sdk/QueryAccountRequest";
+ value: QueryAccountRequestAmino;
+}
+/** QueryAccountResponse is the response type for the Query/Account RPC method. */
+export interface QueryAccountResponse {
+ /** account defines the account of the corresponding address. */
+ account?: BaseAccount | EthAccount | Any | undefined;
+}
+export interface QueryAccountResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse";
+ value: Uint8Array;
+}
+export type QueryAccountResponseEncoded = Omit & {
+ /** account defines the account of the corresponding address. */account?: BaseAccountProtoMsg | EthAccountProtoMsg | AnyProtoMsg | undefined;
+};
+/** QueryAccountResponse is the response type for the Query/Account RPC method. */
+export interface QueryAccountResponseAmino {
+ /** account defines the account of the corresponding address. */
+ account?: AnyAmino;
+}
+export interface QueryAccountResponseAminoMsg {
+ type: "cosmos-sdk/QueryAccountResponse";
+ value: QueryAccountResponseAmino;
+}
+/** QueryParamsRequest is the request type for the Query/Params RPC method. */
+export interface QueryParamsRequest {}
+export interface QueryParamsRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest";
+ value: Uint8Array;
+}
+/** QueryParamsRequest is the request type for the Query/Params RPC method. */
+export interface QueryParamsRequestAmino {}
+export interface QueryParamsRequestAminoMsg {
+ type: "cosmos-sdk/QueryParamsRequest";
+ value: QueryParamsRequestAmino;
+}
+/** QueryParamsResponse is the response type for the Query/Params RPC method. */
+export interface QueryParamsResponse {
+ /** params defines the parameters of the module. */
+ params: Params;
+}
+export interface QueryParamsResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse";
+ value: Uint8Array;
+}
+/** QueryParamsResponse is the response type for the Query/Params RPC method. */
+export interface QueryParamsResponseAmino {
+ /** params defines the parameters of the module. */
+ params: ParamsAmino;
+}
+export interface QueryParamsResponseAminoMsg {
+ type: "cosmos-sdk/QueryParamsResponse";
+ value: QueryParamsResponseAmino;
+}
+/**
+ * QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsRequest {}
+export interface QueryModuleAccountsRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest";
+ value: Uint8Array;
+}
+/**
+ * QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsRequestAmino {}
+export interface QueryModuleAccountsRequestAminoMsg {
+ type: "cosmos-sdk/QueryModuleAccountsRequest";
+ value: QueryModuleAccountsRequestAmino;
+}
+/**
+ * QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsResponse {
+ accounts: (ModuleAccount | Any)[] | Any[];
+}
+export interface QueryModuleAccountsResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse";
+ value: Uint8Array;
+}
+export type QueryModuleAccountsResponseEncoded = Omit & {
+ accounts: (ModuleAccountProtoMsg | AnyProtoMsg)[];
+};
+/**
+ * QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface QueryModuleAccountsResponseAmino {
+ accounts: AnyAmino[];
+}
+export interface QueryModuleAccountsResponseAminoMsg {
+ type: "cosmos-sdk/QueryModuleAccountsResponse";
+ value: QueryModuleAccountsResponseAmino;
+}
+/** QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameRequest {
+ name: string;
+}
+export interface QueryModuleAccountByNameRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest";
+ value: Uint8Array;
+}
+/** QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameRequestAmino {
+ name: string;
+}
+export interface QueryModuleAccountByNameRequestAminoMsg {
+ type: "cosmos-sdk/QueryModuleAccountByNameRequest";
+ value: QueryModuleAccountByNameRequestAmino;
+}
+/** QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameResponse {
+ account?: ModuleAccount | Any | undefined;
+}
+export interface QueryModuleAccountByNameResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse";
+ value: Uint8Array;
+}
+export type QueryModuleAccountByNameResponseEncoded = Omit & {
+ account?: ModuleAccountProtoMsg | AnyProtoMsg | undefined;
+};
+/** QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. */
+export interface QueryModuleAccountByNameResponseAmino {
+ account?: AnyAmino;
+}
+export interface QueryModuleAccountByNameResponseAminoMsg {
+ type: "cosmos-sdk/QueryModuleAccountByNameResponse";
+ value: QueryModuleAccountByNameResponseAmino;
+}
+/**
+ * Bech32PrefixRequest is the request type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixRequest {}
+export interface Bech32PrefixRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest";
+ value: Uint8Array;
+}
+/**
+ * Bech32PrefixRequest is the request type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixRequestAmino {}
+export interface Bech32PrefixRequestAminoMsg {
+ type: "cosmos-sdk/Bech32PrefixRequest";
+ value: Bech32PrefixRequestAmino;
+}
+/**
+ * Bech32PrefixResponse is the response type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixResponse {
+ bech32Prefix: string;
+}
+export interface Bech32PrefixResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse";
+ value: Uint8Array;
+}
+/**
+ * Bech32PrefixResponse is the response type for Bech32Prefix rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface Bech32PrefixResponseAmino {
+ bech32_prefix: string;
+}
+export interface Bech32PrefixResponseAminoMsg {
+ type: "cosmos-sdk/Bech32PrefixResponse";
+ value: Bech32PrefixResponseAmino;
+}
+/**
+ * AddressBytesToStringRequest is the request type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringRequest {
+ addressBytes: Uint8Array;
+}
+export interface AddressBytesToStringRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest";
+ value: Uint8Array;
+}
+/**
+ * AddressBytesToStringRequest is the request type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringRequestAmino {
+ address_bytes: string;
+}
+export interface AddressBytesToStringRequestAminoMsg {
+ type: "cosmos-sdk/AddressBytesToStringRequest";
+ value: AddressBytesToStringRequestAmino;
+}
+/**
+ * AddressBytesToStringResponse is the response type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringResponse {
+ addressString: string;
+}
+export interface AddressBytesToStringResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse";
+ value: Uint8Array;
+}
+/**
+ * AddressBytesToStringResponse is the response type for AddressString rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressBytesToStringResponseAmino {
+ address_string: string;
+}
+export interface AddressBytesToStringResponseAminoMsg {
+ type: "cosmos-sdk/AddressBytesToStringResponse";
+ value: AddressBytesToStringResponseAmino;
+}
+/**
+ * AddressStringToBytesRequest is the request type for AccountBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesRequest {
+ addressString: string;
+}
+export interface AddressStringToBytesRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest";
+ value: Uint8Array;
+}
+/**
+ * AddressStringToBytesRequest is the request type for AccountBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesRequestAmino {
+ address_string: string;
+}
+export interface AddressStringToBytesRequestAminoMsg {
+ type: "cosmos-sdk/AddressStringToBytesRequest";
+ value: AddressStringToBytesRequestAmino;
+}
+/**
+ * AddressStringToBytesResponse is the response type for AddressBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesResponse {
+ addressBytes: Uint8Array;
+}
+export interface AddressStringToBytesResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse";
+ value: Uint8Array;
+}
+/**
+ * AddressStringToBytesResponse is the response type for AddressBytes rpc method.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+export interface AddressStringToBytesResponseAmino {
+ address_bytes: string;
+}
+export interface AddressStringToBytesResponseAminoMsg {
+ type: "cosmos-sdk/AddressStringToBytesResponse";
+ value: AddressStringToBytesResponseAmino;
+}
+/**
+ * QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDRequest {
+ /**
+ * Deprecated, use account_id instead
+ *
+ * id is the account number of the address to be queried. This field
+ * should have been an uint64 (like all account numbers), and will be
+ * updated to uint64 in a future version of the auth query.
+ */
+ /** @deprecated */
+ id: bigint;
+ /**
+ * account_id is the account number of the address to be queried.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+ accountId: bigint;
+}
+export interface QueryAccountAddressByIDRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDRequestAmino {
+ /**
+ * Deprecated, use account_id instead
+ *
+ * id is the account number of the address to be queried. This field
+ * should have been an uint64 (like all account numbers), and will be
+ * updated to uint64 in a future version of the auth query.
+ */
+ /** @deprecated */
+ id: string;
+ /**
+ * account_id is the account number of the address to be queried.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+ account_id: string;
+}
+export interface QueryAccountAddressByIDRequestAminoMsg {
+ type: "cosmos-sdk/QueryAccountAddressByIDRequest";
+ value: QueryAccountAddressByIDRequestAmino;
+}
+/**
+ * QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDResponse {
+ accountAddress: string;
+}
+export interface QueryAccountAddressByIDResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method
+ *
+ * Since: cosmos-sdk 0.46.2
+ */
+export interface QueryAccountAddressByIDResponseAmino {
+ account_address: string;
+}
+export interface QueryAccountAddressByIDResponseAminoMsg {
+ type: "cosmos-sdk/QueryAccountAddressByIDResponse";
+ value: QueryAccountAddressByIDResponseAmino;
+}
+/**
+ * QueryAccountInfoRequest is the Query/AccountInfo request type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoRequest {
+ /** address is the account address string. */
+ address: string;
+}
+export interface QueryAccountInfoRequestProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountInfoRequest is the Query/AccountInfo request type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoRequestAmino {
+ /** address is the account address string. */
+ address: string;
+}
+export interface QueryAccountInfoRequestAminoMsg {
+ type: "cosmos-sdk/QueryAccountInfoRequest";
+ value: QueryAccountInfoRequestAmino;
+}
+/**
+ * QueryAccountInfoResponse is the Query/AccountInfo response type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoResponse {
+ /** info is the account info which is represented by BaseAccount. */
+ info?: BaseAccount;
+}
+export interface QueryAccountInfoResponseProtoMsg {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse";
+ value: Uint8Array;
+}
+/**
+ * QueryAccountInfoResponse is the Query/AccountInfo response type.
+ *
+ * Since: cosmos-sdk 0.47
+ */
+export interface QueryAccountInfoResponseAmino {
+ /** info is the account info which is represented by BaseAccount. */
+ info?: BaseAccountAmino;
+}
+export interface QueryAccountInfoResponseAminoMsg {
+ type: "cosmos-sdk/QueryAccountInfoResponse";
+ value: QueryAccountInfoResponseAmino;
+}
+function createBaseQueryAccountsRequest(): QueryAccountsRequest {
+ return {
+ pagination: undefined
+ };
+}
+export const QueryAccountsRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest",
+ aminoType: "cosmos-sdk/QueryAccountsRequest",
+ is(o: any): o is QueryAccountsRequest {
+ return o && o.$typeUrl === QueryAccountsRequest.typeUrl;
+ },
+ isAmino(o: any): o is QueryAccountsRequestAmino {
+ return o && o.$typeUrl === QueryAccountsRequest.typeUrl;
+ },
+ encode(message: QueryAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.pagination !== undefined) {
+ PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountsRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryAccountsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.pagination = PageRequest.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryAccountsRequest {
+ const message = createBaseQueryAccountsRequest();
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryAccountsRequestAmino): QueryAccountsRequest {
+ const message = createBaseQueryAccountsRequest();
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageRequest.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountsRequest): QueryAccountsRequestAmino {
+ const obj: any = {};
+ obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountsRequestAminoMsg): QueryAccountsRequest {
+ return QueryAccountsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountsRequest): QueryAccountsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountsRequest",
+ value: QueryAccountsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountsRequestProtoMsg): QueryAccountsRequest {
+ return QueryAccountsRequest.decode(message.value);
+ },
+ toProto(message: QueryAccountsRequest): Uint8Array {
+ return QueryAccountsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountsRequest): QueryAccountsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsRequest",
+ value: QueryAccountsRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryAccountsRequest.typeUrl, QueryAccountsRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsRequest.aminoType, QueryAccountsRequest.typeUrl);
+function createBaseQueryAccountsResponse(): QueryAccountsResponse {
+ return {
+ accounts: [],
+ pagination: undefined
+ };
+}
+export const QueryAccountsResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse",
+ aminoType: "cosmos-sdk/QueryAccountsResponse",
+ is(o: any): o is QueryAccountsResponse {
+ return o && (o.$typeUrl === QueryAccountsResponse.typeUrl || Array.isArray(o.accounts) && (!o.accounts.length || BaseAccount.is(o.accounts[0]) || EthAccount.is(o.accounts[0]) || Any.is(o.accounts[0])));
+ },
+ isAmino(o: any): o is QueryAccountsResponseAmino {
+ return o && (o.$typeUrl === QueryAccountsResponse.typeUrl || Array.isArray(o.accounts) && (!o.accounts.length || BaseAccount.isAmino(o.accounts[0]) || EthAccount.isAmino(o.accounts[0]) || Any.isAmino(o.accounts[0])));
+ },
+ encode(message: QueryAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.accounts) {
+ Any.encode(GlobalDecoderRegistry.wrapAny(v!), writer.uint32(10).fork()).ldelim();
+ }
+ if (message.pagination !== undefined) {
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountsResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryAccountsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.accounts.push(GlobalDecoderRegistry.unwrapAny(reader));
+ break;
+ case 2:
+ message.pagination = PageResponse.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryAccountsResponse {
+ const message = createBaseQueryAccountsResponse();
+ message.accounts = object.accounts?.map(e => (GlobalDecoderRegistry.fromPartial(e) as any)) || [];
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryAccountsResponseAmino): QueryAccountsResponse {
+ const message = createBaseQueryAccountsResponse();
+ message.accounts = object.accounts?.map(e => GlobalDecoderRegistry.fromAminoMsg(e)) || [];
+ if (object.pagination !== undefined && object.pagination !== null) {
+ message.pagination = PageResponse.fromAmino(object.pagination);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountsResponse): QueryAccountsResponseAmino {
+ const obj: any = {};
+ if (message.accounts) {
+ obj.accounts = message.accounts.map(e => e ? GlobalDecoderRegistry.toAminoMsg(e) : undefined);
+ } else {
+ obj.accounts = message.accounts;
+ }
+ obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountsResponseAminoMsg): QueryAccountsResponse {
+ return QueryAccountsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountsResponse): QueryAccountsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountsResponse",
+ value: QueryAccountsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountsResponseProtoMsg): QueryAccountsResponse {
+ return QueryAccountsResponse.decode(message.value);
+ },
+ toProto(message: QueryAccountsResponse): Uint8Array {
+ return QueryAccountsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountsResponse): QueryAccountsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountsResponse",
+ value: QueryAccountsResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryAccountsResponse.typeUrl, QueryAccountsResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountsResponse.aminoType, QueryAccountsResponse.typeUrl);
+function createBaseQueryAccountRequest(): QueryAccountRequest {
+ return {
+ address: ""
+ };
+}
+export const QueryAccountRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest",
+ aminoType: "cosmos-sdk/QueryAccountRequest",
+ is(o: any): o is QueryAccountRequest {
+ return o && (o.$typeUrl === QueryAccountRequest.typeUrl || typeof o.address === "string");
+ },
+ isAmino(o: any): o is QueryAccountRequestAmino {
+ return o && (o.$typeUrl === QueryAccountRequest.typeUrl || typeof o.address === "string");
+ },
+ encode(message: QueryAccountRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.address !== "") {
+ writer.uint32(10).string(message.address);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryAccountRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.address = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryAccountRequest {
+ const message = createBaseQueryAccountRequest();
+ message.address = object.address ?? "";
+ return message;
+ },
+ fromAmino(object: QueryAccountRequestAmino): QueryAccountRequest {
+ const message = createBaseQueryAccountRequest();
+ if (object.address !== undefined && object.address !== null) {
+ message.address = object.address;
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountRequest): QueryAccountRequestAmino {
+ const obj: any = {};
+ obj.address = message.address === "" ? undefined : message.address;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountRequestAminoMsg): QueryAccountRequest {
+ return QueryAccountRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountRequest): QueryAccountRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountRequest",
+ value: QueryAccountRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountRequestProtoMsg): QueryAccountRequest {
+ return QueryAccountRequest.decode(message.value);
+ },
+ toProto(message: QueryAccountRequest): Uint8Array {
+ return QueryAccountRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountRequest): QueryAccountRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountRequest",
+ value: QueryAccountRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryAccountRequest.typeUrl, QueryAccountRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountRequest.aminoType, QueryAccountRequest.typeUrl);
+function createBaseQueryAccountResponse(): QueryAccountResponse {
+ return {
+ account: undefined
+ };
+}
+export const QueryAccountResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse",
+ aminoType: "cosmos-sdk/QueryAccountResponse",
+ is(o: any): o is QueryAccountResponse {
+ return o && o.$typeUrl === QueryAccountResponse.typeUrl;
+ },
+ isAmino(o: any): o is QueryAccountResponseAmino {
+ return o && o.$typeUrl === QueryAccountResponse.typeUrl;
+ },
+ encode(message: QueryAccountResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.account !== undefined) {
+ Any.encode(GlobalDecoderRegistry.wrapAny(message.account), writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryAccountResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.account = GlobalDecoderRegistry.unwrapAny(reader);
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryAccountResponse {
+ const message = createBaseQueryAccountResponse();
+ message.account = object.account !== undefined && object.account !== null ? GlobalDecoderRegistry.fromPartial(object.account) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryAccountResponseAmino): QueryAccountResponse {
+ const message = createBaseQueryAccountResponse();
+ if (object.account !== undefined && object.account !== null) {
+ message.account = GlobalDecoderRegistry.fromAminoMsg(object.account);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountResponse): QueryAccountResponseAmino {
+ const obj: any = {};
+ obj.account = message.account ? GlobalDecoderRegistry.toAminoMsg(message.account) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountResponseAminoMsg): QueryAccountResponse {
+ return QueryAccountResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountResponse): QueryAccountResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountResponse",
+ value: QueryAccountResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountResponseProtoMsg): QueryAccountResponse {
+ return QueryAccountResponse.decode(message.value);
+ },
+ toProto(message: QueryAccountResponse): Uint8Array {
+ return QueryAccountResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountResponse): QueryAccountResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountResponse",
+ value: QueryAccountResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryAccountResponse.typeUrl, QueryAccountResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountResponse.aminoType, QueryAccountResponse.typeUrl);
+function createBaseQueryParamsRequest(): QueryParamsRequest {
+ return {};
+}
+export const QueryParamsRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest",
+ aminoType: "cosmos-sdk/QueryParamsRequest",
+ is(o: any): o is QueryParamsRequest {
+ return o && o.$typeUrl === QueryParamsRequest.typeUrl;
+ },
+ isAmino(o: any): o is QueryParamsRequestAmino {
+ return o && o.$typeUrl === QueryParamsRequest.typeUrl;
+ },
+ encode(_: QueryParamsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryParamsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): QueryParamsRequest {
+ const message = createBaseQueryParamsRequest();
+ return message;
+ },
+ fromAmino(_: QueryParamsRequestAmino): QueryParamsRequest {
+ const message = createBaseQueryParamsRequest();
+ return message;
+ },
+ toAmino(_: QueryParamsRequest): QueryParamsRequestAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: QueryParamsRequestAminoMsg): QueryParamsRequest {
+ return QueryParamsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryParamsRequest): QueryParamsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryParamsRequest",
+ value: QueryParamsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryParamsRequestProtoMsg): QueryParamsRequest {
+ return QueryParamsRequest.decode(message.value);
+ },
+ toProto(message: QueryParamsRequest): Uint8Array {
+ return QueryParamsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryParamsRequest): QueryParamsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsRequest",
+ value: QueryParamsRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryParamsRequest.typeUrl, QueryParamsRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsRequest.aminoType, QueryParamsRequest.typeUrl);
+function createBaseQueryParamsResponse(): QueryParamsResponse {
+ return {
+ params: Params.fromPartial({})
+ };
+}
+export const QueryParamsResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse",
+ aminoType: "cosmos-sdk/QueryParamsResponse",
+ is(o: any): o is QueryParamsResponse {
+ return o && (o.$typeUrl === QueryParamsResponse.typeUrl || Params.is(o.params));
+ },
+ isAmino(o: any): o is QueryParamsResponseAmino {
+ return o && (o.$typeUrl === QueryParamsResponse.typeUrl || Params.isAmino(o.params));
+ },
+ encode(message: QueryParamsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.params !== undefined) {
+ Params.encode(message.params, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryParamsResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryParamsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.params = Params.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryParamsResponse {
+ const message = createBaseQueryParamsResponse();
+ message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryParamsResponseAmino): QueryParamsResponse {
+ const message = createBaseQueryParamsResponse();
+ if (object.params !== undefined && object.params !== null) {
+ message.params = Params.fromAmino(object.params);
+ }
+ return message;
+ },
+ toAmino(message: QueryParamsResponse): QueryParamsResponseAmino {
+ const obj: any = {};
+ obj.params = message.params ? Params.toAmino(message.params) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryParamsResponseAminoMsg): QueryParamsResponse {
+ return QueryParamsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryParamsResponse): QueryParamsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryParamsResponse",
+ value: QueryParamsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryParamsResponseProtoMsg): QueryParamsResponse {
+ return QueryParamsResponse.decode(message.value);
+ },
+ toProto(message: QueryParamsResponse): Uint8Array {
+ return QueryParamsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryParamsResponse): QueryParamsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryParamsResponse",
+ value: QueryParamsResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryParamsResponse.typeUrl, QueryParamsResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryParamsResponse.aminoType, QueryParamsResponse.typeUrl);
+function createBaseQueryModuleAccountsRequest(): QueryModuleAccountsRequest {
+ return {};
+}
+export const QueryModuleAccountsRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest",
+ aminoType: "cosmos-sdk/QueryModuleAccountsRequest",
+ is(o: any): o is QueryModuleAccountsRequest {
+ return o && o.$typeUrl === QueryModuleAccountsRequest.typeUrl;
+ },
+ isAmino(o: any): o is QueryModuleAccountsRequestAmino {
+ return o && o.$typeUrl === QueryModuleAccountsRequest.typeUrl;
+ },
+ encode(_: QueryModuleAccountsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountsRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryModuleAccountsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): QueryModuleAccountsRequest {
+ const message = createBaseQueryModuleAccountsRequest();
+ return message;
+ },
+ fromAmino(_: QueryModuleAccountsRequestAmino): QueryModuleAccountsRequest {
+ const message = createBaseQueryModuleAccountsRequest();
+ return message;
+ },
+ toAmino(_: QueryModuleAccountsRequest): QueryModuleAccountsRequestAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: QueryModuleAccountsRequestAminoMsg): QueryModuleAccountsRequest {
+ return QueryModuleAccountsRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryModuleAccountsRequest): QueryModuleAccountsRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryModuleAccountsRequest",
+ value: QueryModuleAccountsRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryModuleAccountsRequestProtoMsg): QueryModuleAccountsRequest {
+ return QueryModuleAccountsRequest.decode(message.value);
+ },
+ toProto(message: QueryModuleAccountsRequest): Uint8Array {
+ return QueryModuleAccountsRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryModuleAccountsRequest): QueryModuleAccountsRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsRequest",
+ value: QueryModuleAccountsRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryModuleAccountsRequest.typeUrl, QueryModuleAccountsRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsRequest.aminoType, QueryModuleAccountsRequest.typeUrl);
+function createBaseQueryModuleAccountsResponse(): QueryModuleAccountsResponse {
+ return {
+ accounts: []
+ };
+}
+export const QueryModuleAccountsResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse",
+ aminoType: "cosmos-sdk/QueryModuleAccountsResponse",
+ is(o: any): o is QueryModuleAccountsResponse {
+ return o && (o.$typeUrl === QueryModuleAccountsResponse.typeUrl || Array.isArray(o.accounts) && (!o.accounts.length || ModuleAccount.is(o.accounts[0]) || Any.is(o.accounts[0])));
+ },
+ isAmino(o: any): o is QueryModuleAccountsResponseAmino {
+ return o && (o.$typeUrl === QueryModuleAccountsResponse.typeUrl || Array.isArray(o.accounts) && (!o.accounts.length || ModuleAccount.isAmino(o.accounts[0]) || Any.isAmino(o.accounts[0])));
+ },
+ encode(message: QueryModuleAccountsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.accounts) {
+ Any.encode(GlobalDecoderRegistry.wrapAny(v!), writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountsResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryModuleAccountsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.accounts.push(GlobalDecoderRegistry.unwrapAny(reader));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryModuleAccountsResponse {
+ const message = createBaseQueryModuleAccountsResponse();
+ message.accounts = object.accounts?.map(e => (GlobalDecoderRegistry.fromPartial(e) as any)) || [];
+ return message;
+ },
+ fromAmino(object: QueryModuleAccountsResponseAmino): QueryModuleAccountsResponse {
+ const message = createBaseQueryModuleAccountsResponse();
+ message.accounts = object.accounts?.map(e => GlobalDecoderRegistry.fromAminoMsg(e)) || [];
+ return message;
+ },
+ toAmino(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseAmino {
+ const obj: any = {};
+ if (message.accounts) {
+ obj.accounts = message.accounts.map(e => e ? GlobalDecoderRegistry.toAminoMsg(e) : undefined);
+ } else {
+ obj.accounts = message.accounts;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: QueryModuleAccountsResponseAminoMsg): QueryModuleAccountsResponse {
+ return QueryModuleAccountsResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryModuleAccountsResponse",
+ value: QueryModuleAccountsResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryModuleAccountsResponseProtoMsg): QueryModuleAccountsResponse {
+ return QueryModuleAccountsResponse.decode(message.value);
+ },
+ toProto(message: QueryModuleAccountsResponse): Uint8Array {
+ return QueryModuleAccountsResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryModuleAccountsResponse): QueryModuleAccountsResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountsResponse",
+ value: QueryModuleAccountsResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryModuleAccountsResponse.typeUrl, QueryModuleAccountsResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountsResponse.aminoType, QueryModuleAccountsResponse.typeUrl);
+function createBaseQueryModuleAccountByNameRequest(): QueryModuleAccountByNameRequest {
+ return {
+ name: ""
+ };
+}
+export const QueryModuleAccountByNameRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest",
+ aminoType: "cosmos-sdk/QueryModuleAccountByNameRequest",
+ is(o: any): o is QueryModuleAccountByNameRequest {
+ return o && (o.$typeUrl === QueryModuleAccountByNameRequest.typeUrl || typeof o.name === "string");
+ },
+ isAmino(o: any): o is QueryModuleAccountByNameRequestAmino {
+ return o && (o.$typeUrl === QueryModuleAccountByNameRequest.typeUrl || typeof o.name === "string");
+ },
+ encode(message: QueryModuleAccountByNameRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountByNameRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryModuleAccountByNameRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.name = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryModuleAccountByNameRequest {
+ const message = createBaseQueryModuleAccountByNameRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+ fromAmino(object: QueryModuleAccountByNameRequestAmino): QueryModuleAccountByNameRequest {
+ const message = createBaseQueryModuleAccountByNameRequest();
+ if (object.name !== undefined && object.name !== null) {
+ message.name = object.name;
+ }
+ return message;
+ },
+ toAmino(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestAmino {
+ const obj: any = {};
+ obj.name = message.name === "" ? undefined : message.name;
+ return obj;
+ },
+ fromAminoMsg(object: QueryModuleAccountByNameRequestAminoMsg): QueryModuleAccountByNameRequest {
+ return QueryModuleAccountByNameRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryModuleAccountByNameRequest",
+ value: QueryModuleAccountByNameRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryModuleAccountByNameRequestProtoMsg): QueryModuleAccountByNameRequest {
+ return QueryModuleAccountByNameRequest.decode(message.value);
+ },
+ toProto(message: QueryModuleAccountByNameRequest): Uint8Array {
+ return QueryModuleAccountByNameRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryModuleAccountByNameRequest): QueryModuleAccountByNameRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest",
+ value: QueryModuleAccountByNameRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryModuleAccountByNameRequest.typeUrl, QueryModuleAccountByNameRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameRequest.aminoType, QueryModuleAccountByNameRequest.typeUrl);
+function createBaseQueryModuleAccountByNameResponse(): QueryModuleAccountByNameResponse {
+ return {
+ account: undefined
+ };
+}
+export const QueryModuleAccountByNameResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse",
+ aminoType: "cosmos-sdk/QueryModuleAccountByNameResponse",
+ is(o: any): o is QueryModuleAccountByNameResponse {
+ return o && o.$typeUrl === QueryModuleAccountByNameResponse.typeUrl;
+ },
+ isAmino(o: any): o is QueryModuleAccountByNameResponseAmino {
+ return o && o.$typeUrl === QueryModuleAccountByNameResponse.typeUrl;
+ },
+ encode(message: QueryModuleAccountByNameResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.account !== undefined) {
+ Any.encode(GlobalDecoderRegistry.wrapAny(message.account), writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryModuleAccountByNameResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryModuleAccountByNameResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.account = GlobalDecoderRegistry.unwrapAny(reader);
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryModuleAccountByNameResponse {
+ const message = createBaseQueryModuleAccountByNameResponse();
+ message.account = object.account !== undefined && object.account !== null ? GlobalDecoderRegistry.fromPartial(object.account) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryModuleAccountByNameResponseAmino): QueryModuleAccountByNameResponse {
+ const message = createBaseQueryModuleAccountByNameResponse();
+ if (object.account !== undefined && object.account !== null) {
+ message.account = GlobalDecoderRegistry.fromAminoMsg(object.account);
+ }
+ return message;
+ },
+ toAmino(message: QueryModuleAccountByNameResponse): QueryModuleAccountByNameResponseAmino {
+ const obj: any = {};
+ obj.account = message.account ? GlobalDecoderRegistry.toAminoMsg(message.account) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryModuleAccountByNameResponseAminoMsg): QueryModuleAccountByNameResponse {
+ return QueryModuleAccountByNameResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryModuleAccountByNameResponse): QueryModuleAccountByNameResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryModuleAccountByNameResponse",
+ value: QueryModuleAccountByNameResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryModuleAccountByNameResponseProtoMsg): QueryModuleAccountByNameResponse {
+ return QueryModuleAccountByNameResponse.decode(message.value);
+ },
+ toProto(message: QueryModuleAccountByNameResponse): Uint8Array {
+ return QueryModuleAccountByNameResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryModuleAccountByNameResponse): QueryModuleAccountByNameResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse",
+ value: QueryModuleAccountByNameResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryModuleAccountByNameResponse.typeUrl, QueryModuleAccountByNameResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryModuleAccountByNameResponse.aminoType, QueryModuleAccountByNameResponse.typeUrl);
+function createBaseBech32PrefixRequest(): Bech32PrefixRequest {
+ return {};
+}
+export const Bech32PrefixRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest",
+ aminoType: "cosmos-sdk/Bech32PrefixRequest",
+ is(o: any): o is Bech32PrefixRequest {
+ return o && o.$typeUrl === Bech32PrefixRequest.typeUrl;
+ },
+ isAmino(o: any): o is Bech32PrefixRequestAmino {
+ return o && o.$typeUrl === Bech32PrefixRequest.typeUrl;
+ },
+ encode(_: Bech32PrefixRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Bech32PrefixRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseBech32PrefixRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): Bech32PrefixRequest {
+ const message = createBaseBech32PrefixRequest();
+ return message;
+ },
+ fromAmino(_: Bech32PrefixRequestAmino): Bech32PrefixRequest {
+ const message = createBaseBech32PrefixRequest();
+ return message;
+ },
+ toAmino(_: Bech32PrefixRequest): Bech32PrefixRequestAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: Bech32PrefixRequestAminoMsg): Bech32PrefixRequest {
+ return Bech32PrefixRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: Bech32PrefixRequest): Bech32PrefixRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/Bech32PrefixRequest",
+ value: Bech32PrefixRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: Bech32PrefixRequestProtoMsg): Bech32PrefixRequest {
+ return Bech32PrefixRequest.decode(message.value);
+ },
+ toProto(message: Bech32PrefixRequest): Uint8Array {
+ return Bech32PrefixRequest.encode(message).finish();
+ },
+ toProtoMsg(message: Bech32PrefixRequest): Bech32PrefixRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixRequest",
+ value: Bech32PrefixRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(Bech32PrefixRequest.typeUrl, Bech32PrefixRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixRequest.aminoType, Bech32PrefixRequest.typeUrl);
+function createBaseBech32PrefixResponse(): Bech32PrefixResponse {
+ return {
+ bech32Prefix: ""
+ };
+}
+export const Bech32PrefixResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse",
+ aminoType: "cosmos-sdk/Bech32PrefixResponse",
+ is(o: any): o is Bech32PrefixResponse {
+ return o && (o.$typeUrl === Bech32PrefixResponse.typeUrl || typeof o.bech32Prefix === "string");
+ },
+ isAmino(o: any): o is Bech32PrefixResponseAmino {
+ return o && (o.$typeUrl === Bech32PrefixResponse.typeUrl || typeof o.bech32_prefix === "string");
+ },
+ encode(message: Bech32PrefixResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.bech32Prefix !== "") {
+ writer.uint32(10).string(message.bech32Prefix);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Bech32PrefixResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseBech32PrefixResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.bech32Prefix = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Bech32PrefixResponse {
+ const message = createBaseBech32PrefixResponse();
+ message.bech32Prefix = object.bech32Prefix ?? "";
+ return message;
+ },
+ fromAmino(object: Bech32PrefixResponseAmino): Bech32PrefixResponse {
+ const message = createBaseBech32PrefixResponse();
+ if (object.bech32_prefix !== undefined && object.bech32_prefix !== null) {
+ message.bech32Prefix = object.bech32_prefix;
+ }
+ return message;
+ },
+ toAmino(message: Bech32PrefixResponse): Bech32PrefixResponseAmino {
+ const obj: any = {};
+ obj.bech32_prefix = message.bech32Prefix === "" ? undefined : message.bech32Prefix;
+ return obj;
+ },
+ fromAminoMsg(object: Bech32PrefixResponseAminoMsg): Bech32PrefixResponse {
+ return Bech32PrefixResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: Bech32PrefixResponse): Bech32PrefixResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/Bech32PrefixResponse",
+ value: Bech32PrefixResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: Bech32PrefixResponseProtoMsg): Bech32PrefixResponse {
+ return Bech32PrefixResponse.decode(message.value);
+ },
+ toProto(message: Bech32PrefixResponse): Uint8Array {
+ return Bech32PrefixResponse.encode(message).finish();
+ },
+ toProtoMsg(message: Bech32PrefixResponse): Bech32PrefixResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.Bech32PrefixResponse",
+ value: Bech32PrefixResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(Bech32PrefixResponse.typeUrl, Bech32PrefixResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(Bech32PrefixResponse.aminoType, Bech32PrefixResponse.typeUrl);
+function createBaseAddressBytesToStringRequest(): AddressBytesToStringRequest {
+ return {
+ addressBytes: new Uint8Array()
+ };
+}
+export const AddressBytesToStringRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest",
+ aminoType: "cosmos-sdk/AddressBytesToStringRequest",
+ is(o: any): o is AddressBytesToStringRequest {
+ return o && (o.$typeUrl === AddressBytesToStringRequest.typeUrl || o.addressBytes instanceof Uint8Array || typeof o.addressBytes === "string");
+ },
+ isAmino(o: any): o is AddressBytesToStringRequestAmino {
+ return o && (o.$typeUrl === AddressBytesToStringRequest.typeUrl || o.address_bytes instanceof Uint8Array || typeof o.address_bytes === "string");
+ },
+ encode(message: AddressBytesToStringRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.addressBytes.length !== 0) {
+ writer.uint32(10).bytes(message.addressBytes);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): AddressBytesToStringRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAddressBytesToStringRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.addressBytes = reader.bytes();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): AddressBytesToStringRequest {
+ const message = createBaseAddressBytesToStringRequest();
+ message.addressBytes = object.addressBytes ?? new Uint8Array();
+ return message;
+ },
+ fromAmino(object: AddressBytesToStringRequestAmino): AddressBytesToStringRequest {
+ const message = createBaseAddressBytesToStringRequest();
+ if (object.address_bytes !== undefined && object.address_bytes !== null) {
+ message.addressBytes = bytesFromBase64(object.address_bytes);
+ }
+ return message;
+ },
+ toAmino(message: AddressBytesToStringRequest): AddressBytesToStringRequestAmino {
+ const obj: any = {};
+ obj.address_bytes = message.addressBytes ? base64FromBytes(message.addressBytes) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: AddressBytesToStringRequestAminoMsg): AddressBytesToStringRequest {
+ return AddressBytesToStringRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: AddressBytesToStringRequest): AddressBytesToStringRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/AddressBytesToStringRequest",
+ value: AddressBytesToStringRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: AddressBytesToStringRequestProtoMsg): AddressBytesToStringRequest {
+ return AddressBytesToStringRequest.decode(message.value);
+ },
+ toProto(message: AddressBytesToStringRequest): Uint8Array {
+ return AddressBytesToStringRequest.encode(message).finish();
+ },
+ toProtoMsg(message: AddressBytesToStringRequest): AddressBytesToStringRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringRequest",
+ value: AddressBytesToStringRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(AddressBytesToStringRequest.typeUrl, AddressBytesToStringRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringRequest.aminoType, AddressBytesToStringRequest.typeUrl);
+function createBaseAddressBytesToStringResponse(): AddressBytesToStringResponse {
+ return {
+ addressString: ""
+ };
+}
+export const AddressBytesToStringResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse",
+ aminoType: "cosmos-sdk/AddressBytesToStringResponse",
+ is(o: any): o is AddressBytesToStringResponse {
+ return o && (o.$typeUrl === AddressBytesToStringResponse.typeUrl || typeof o.addressString === "string");
+ },
+ isAmino(o: any): o is AddressBytesToStringResponseAmino {
+ return o && (o.$typeUrl === AddressBytesToStringResponse.typeUrl || typeof o.address_string === "string");
+ },
+ encode(message: AddressBytesToStringResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.addressString !== "") {
+ writer.uint32(10).string(message.addressString);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): AddressBytesToStringResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAddressBytesToStringResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.addressString = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): AddressBytesToStringResponse {
+ const message = createBaseAddressBytesToStringResponse();
+ message.addressString = object.addressString ?? "";
+ return message;
+ },
+ fromAmino(object: AddressBytesToStringResponseAmino): AddressBytesToStringResponse {
+ const message = createBaseAddressBytesToStringResponse();
+ if (object.address_string !== undefined && object.address_string !== null) {
+ message.addressString = object.address_string;
+ }
+ return message;
+ },
+ toAmino(message: AddressBytesToStringResponse): AddressBytesToStringResponseAmino {
+ const obj: any = {};
+ obj.address_string = message.addressString === "" ? undefined : message.addressString;
+ return obj;
+ },
+ fromAminoMsg(object: AddressBytesToStringResponseAminoMsg): AddressBytesToStringResponse {
+ return AddressBytesToStringResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: AddressBytesToStringResponse): AddressBytesToStringResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/AddressBytesToStringResponse",
+ value: AddressBytesToStringResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: AddressBytesToStringResponseProtoMsg): AddressBytesToStringResponse {
+ return AddressBytesToStringResponse.decode(message.value);
+ },
+ toProto(message: AddressBytesToStringResponse): Uint8Array {
+ return AddressBytesToStringResponse.encode(message).finish();
+ },
+ toProtoMsg(message: AddressBytesToStringResponse): AddressBytesToStringResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.AddressBytesToStringResponse",
+ value: AddressBytesToStringResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(AddressBytesToStringResponse.typeUrl, AddressBytesToStringResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(AddressBytesToStringResponse.aminoType, AddressBytesToStringResponse.typeUrl);
+function createBaseAddressStringToBytesRequest(): AddressStringToBytesRequest {
+ return {
+ addressString: ""
+ };
+}
+export const AddressStringToBytesRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest",
+ aminoType: "cosmos-sdk/AddressStringToBytesRequest",
+ is(o: any): o is AddressStringToBytesRequest {
+ return o && (o.$typeUrl === AddressStringToBytesRequest.typeUrl || typeof o.addressString === "string");
+ },
+ isAmino(o: any): o is AddressStringToBytesRequestAmino {
+ return o && (o.$typeUrl === AddressStringToBytesRequest.typeUrl || typeof o.address_string === "string");
+ },
+ encode(message: AddressStringToBytesRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.addressString !== "") {
+ writer.uint32(10).string(message.addressString);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): AddressStringToBytesRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAddressStringToBytesRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.addressString = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): AddressStringToBytesRequest {
+ const message = createBaseAddressStringToBytesRequest();
+ message.addressString = object.addressString ?? "";
+ return message;
+ },
+ fromAmino(object: AddressStringToBytesRequestAmino): AddressStringToBytesRequest {
+ const message = createBaseAddressStringToBytesRequest();
+ if (object.address_string !== undefined && object.address_string !== null) {
+ message.addressString = object.address_string;
+ }
+ return message;
+ },
+ toAmino(message: AddressStringToBytesRequest): AddressStringToBytesRequestAmino {
+ const obj: any = {};
+ obj.address_string = message.addressString === "" ? undefined : message.addressString;
+ return obj;
+ },
+ fromAminoMsg(object: AddressStringToBytesRequestAminoMsg): AddressStringToBytesRequest {
+ return AddressStringToBytesRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: AddressStringToBytesRequest): AddressStringToBytesRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/AddressStringToBytesRequest",
+ value: AddressStringToBytesRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: AddressStringToBytesRequestProtoMsg): AddressStringToBytesRequest {
+ return AddressStringToBytesRequest.decode(message.value);
+ },
+ toProto(message: AddressStringToBytesRequest): Uint8Array {
+ return AddressStringToBytesRequest.encode(message).finish();
+ },
+ toProtoMsg(message: AddressStringToBytesRequest): AddressStringToBytesRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesRequest",
+ value: AddressStringToBytesRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(AddressStringToBytesRequest.typeUrl, AddressStringToBytesRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesRequest.aminoType, AddressStringToBytesRequest.typeUrl);
+function createBaseAddressStringToBytesResponse(): AddressStringToBytesResponse {
+ return {
+ addressBytes: new Uint8Array()
+ };
+}
+export const AddressStringToBytesResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse",
+ aminoType: "cosmos-sdk/AddressStringToBytesResponse",
+ is(o: any): o is AddressStringToBytesResponse {
+ return o && (o.$typeUrl === AddressStringToBytesResponse.typeUrl || o.addressBytes instanceof Uint8Array || typeof o.addressBytes === "string");
+ },
+ isAmino(o: any): o is AddressStringToBytesResponseAmino {
+ return o && (o.$typeUrl === AddressStringToBytesResponse.typeUrl || o.address_bytes instanceof Uint8Array || typeof o.address_bytes === "string");
+ },
+ encode(message: AddressStringToBytesResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.addressBytes.length !== 0) {
+ writer.uint32(10).bytes(message.addressBytes);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): AddressStringToBytesResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAddressStringToBytesResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.addressBytes = reader.bytes();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): AddressStringToBytesResponse {
+ const message = createBaseAddressStringToBytesResponse();
+ message.addressBytes = object.addressBytes ?? new Uint8Array();
+ return message;
+ },
+ fromAmino(object: AddressStringToBytesResponseAmino): AddressStringToBytesResponse {
+ const message = createBaseAddressStringToBytesResponse();
+ if (object.address_bytes !== undefined && object.address_bytes !== null) {
+ message.addressBytes = bytesFromBase64(object.address_bytes);
+ }
+ return message;
+ },
+ toAmino(message: AddressStringToBytesResponse): AddressStringToBytesResponseAmino {
+ const obj: any = {};
+ obj.address_bytes = message.addressBytes ? base64FromBytes(message.addressBytes) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: AddressStringToBytesResponseAminoMsg): AddressStringToBytesResponse {
+ return AddressStringToBytesResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: AddressStringToBytesResponse): AddressStringToBytesResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/AddressStringToBytesResponse",
+ value: AddressStringToBytesResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: AddressStringToBytesResponseProtoMsg): AddressStringToBytesResponse {
+ return AddressStringToBytesResponse.decode(message.value);
+ },
+ toProto(message: AddressStringToBytesResponse): Uint8Array {
+ return AddressStringToBytesResponse.encode(message).finish();
+ },
+ toProtoMsg(message: AddressStringToBytesResponse): AddressStringToBytesResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.AddressStringToBytesResponse",
+ value: AddressStringToBytesResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(AddressStringToBytesResponse.typeUrl, AddressStringToBytesResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(AddressStringToBytesResponse.aminoType, AddressStringToBytesResponse.typeUrl);
+function createBaseQueryAccountAddressByIDRequest(): QueryAccountAddressByIDRequest {
+ return {
+ id: BigInt(0),
+ accountId: BigInt(0)
+ };
+}
+export const QueryAccountAddressByIDRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest",
+ aminoType: "cosmos-sdk/QueryAccountAddressByIDRequest",
+ is(o: any): o is QueryAccountAddressByIDRequest {
+ return o && (o.$typeUrl === QueryAccountAddressByIDRequest.typeUrl || typeof o.id === "bigint" && typeof o.accountId === "bigint");
+ },
+ isAmino(o: any): o is QueryAccountAddressByIDRequestAmino {
+ return o && (o.$typeUrl === QueryAccountAddressByIDRequest.typeUrl || typeof o.id === "bigint" && typeof o.account_id === "bigint");
+ },
+ encode(message: QueryAccountAddressByIDRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.id !== BigInt(0)) {
+ writer.uint32(8).int64(message.id);
+ }
+ if (message.accountId !== BigInt(0)) {
+ writer.uint32(16).uint64(message.accountId);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountAddressByIDRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryAccountAddressByIDRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.id = reader.int64();
+ break;
+ case 2:
+ message.accountId = reader.uint64();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryAccountAddressByIDRequest {
+ const message = createBaseQueryAccountAddressByIDRequest();
+ message.id = object.id !== undefined && object.id !== null ? BigInt(object.id.toString()) : BigInt(0);
+ message.accountId = object.accountId !== undefined && object.accountId !== null ? BigInt(object.accountId.toString()) : BigInt(0);
+ return message;
+ },
+ fromAmino(object: QueryAccountAddressByIDRequestAmino): QueryAccountAddressByIDRequest {
+ const message = createBaseQueryAccountAddressByIDRequest();
+ if (object.id !== undefined && object.id !== null) {
+ message.id = BigInt(object.id);
+ }
+ if (object.account_id !== undefined && object.account_id !== null) {
+ message.accountId = BigInt(object.account_id);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountAddressByIDRequest): QueryAccountAddressByIDRequestAmino {
+ const obj: any = {};
+ obj.id = message.id !== BigInt(0) ? message.id?.toString() : undefined;
+ obj.account_id = message.accountId !== BigInt(0) ? message.accountId?.toString() : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountAddressByIDRequestAminoMsg): QueryAccountAddressByIDRequest {
+ return QueryAccountAddressByIDRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountAddressByIDRequest): QueryAccountAddressByIDRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountAddressByIDRequest",
+ value: QueryAccountAddressByIDRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountAddressByIDRequestProtoMsg): QueryAccountAddressByIDRequest {
+ return QueryAccountAddressByIDRequest.decode(message.value);
+ },
+ toProto(message: QueryAccountAddressByIDRequest): Uint8Array {
+ return QueryAccountAddressByIDRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountAddressByIDRequest): QueryAccountAddressByIDRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest",
+ value: QueryAccountAddressByIDRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryAccountAddressByIDRequest.typeUrl, QueryAccountAddressByIDRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDRequest.aminoType, QueryAccountAddressByIDRequest.typeUrl);
+function createBaseQueryAccountAddressByIDResponse(): QueryAccountAddressByIDResponse {
+ return {
+ accountAddress: ""
+ };
+}
+export const QueryAccountAddressByIDResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse",
+ aminoType: "cosmos-sdk/QueryAccountAddressByIDResponse",
+ is(o: any): o is QueryAccountAddressByIDResponse {
+ return o && (o.$typeUrl === QueryAccountAddressByIDResponse.typeUrl || typeof o.accountAddress === "string");
+ },
+ isAmino(o: any): o is QueryAccountAddressByIDResponseAmino {
+ return o && (o.$typeUrl === QueryAccountAddressByIDResponse.typeUrl || typeof o.account_address === "string");
+ },
+ encode(message: QueryAccountAddressByIDResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.accountAddress !== "") {
+ writer.uint32(10).string(message.accountAddress);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountAddressByIDResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryAccountAddressByIDResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.accountAddress = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryAccountAddressByIDResponse {
+ const message = createBaseQueryAccountAddressByIDResponse();
+ message.accountAddress = object.accountAddress ?? "";
+ return message;
+ },
+ fromAmino(object: QueryAccountAddressByIDResponseAmino): QueryAccountAddressByIDResponse {
+ const message = createBaseQueryAccountAddressByIDResponse();
+ if (object.account_address !== undefined && object.account_address !== null) {
+ message.accountAddress = object.account_address;
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseAmino {
+ const obj: any = {};
+ obj.account_address = message.accountAddress === "" ? undefined : message.accountAddress;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountAddressByIDResponseAminoMsg): QueryAccountAddressByIDResponse {
+ return QueryAccountAddressByIDResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountAddressByIDResponse",
+ value: QueryAccountAddressByIDResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountAddressByIDResponseProtoMsg): QueryAccountAddressByIDResponse {
+ return QueryAccountAddressByIDResponse.decode(message.value);
+ },
+ toProto(message: QueryAccountAddressByIDResponse): Uint8Array {
+ return QueryAccountAddressByIDResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountAddressByIDResponse): QueryAccountAddressByIDResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse",
+ value: QueryAccountAddressByIDResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryAccountAddressByIDResponse.typeUrl, QueryAccountAddressByIDResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountAddressByIDResponse.aminoType, QueryAccountAddressByIDResponse.typeUrl);
+function createBaseQueryAccountInfoRequest(): QueryAccountInfoRequest {
+ return {
+ address: ""
+ };
+}
+export const QueryAccountInfoRequest = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest",
+ aminoType: "cosmos-sdk/QueryAccountInfoRequest",
+ is(o: any): o is QueryAccountInfoRequest {
+ return o && (o.$typeUrl === QueryAccountInfoRequest.typeUrl || typeof o.address === "string");
+ },
+ isAmino(o: any): o is QueryAccountInfoRequestAmino {
+ return o && (o.$typeUrl === QueryAccountInfoRequest.typeUrl || typeof o.address === "string");
+ },
+ encode(message: QueryAccountInfoRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.address !== "") {
+ writer.uint32(10).string(message.address);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountInfoRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryAccountInfoRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.address = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryAccountInfoRequest {
+ const message = createBaseQueryAccountInfoRequest();
+ message.address = object.address ?? "";
+ return message;
+ },
+ fromAmino(object: QueryAccountInfoRequestAmino): QueryAccountInfoRequest {
+ const message = createBaseQueryAccountInfoRequest();
+ if (object.address !== undefined && object.address !== null) {
+ message.address = object.address;
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountInfoRequest): QueryAccountInfoRequestAmino {
+ const obj: any = {};
+ obj.address = message.address === "" ? undefined : message.address;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountInfoRequestAminoMsg): QueryAccountInfoRequest {
+ return QueryAccountInfoRequest.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountInfoRequest): QueryAccountInfoRequestAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountInfoRequest",
+ value: QueryAccountInfoRequest.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountInfoRequestProtoMsg): QueryAccountInfoRequest {
+ return QueryAccountInfoRequest.decode(message.value);
+ },
+ toProto(message: QueryAccountInfoRequest): Uint8Array {
+ return QueryAccountInfoRequest.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountInfoRequest): QueryAccountInfoRequestProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoRequest",
+ value: QueryAccountInfoRequest.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryAccountInfoRequest.typeUrl, QueryAccountInfoRequest);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoRequest.aminoType, QueryAccountInfoRequest.typeUrl);
+function createBaseQueryAccountInfoResponse(): QueryAccountInfoResponse {
+ return {
+ info: undefined
+ };
+}
+export const QueryAccountInfoResponse = {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse",
+ aminoType: "cosmos-sdk/QueryAccountInfoResponse",
+ is(o: any): o is QueryAccountInfoResponse {
+ return o && o.$typeUrl === QueryAccountInfoResponse.typeUrl;
+ },
+ isAmino(o: any): o is QueryAccountInfoResponseAmino {
+ return o && o.$typeUrl === QueryAccountInfoResponse.typeUrl;
+ },
+ encode(message: QueryAccountInfoResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.info !== undefined) {
+ BaseAccount.encode(message.info, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): QueryAccountInfoResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseQueryAccountInfoResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.info = BaseAccount.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): QueryAccountInfoResponse {
+ const message = createBaseQueryAccountInfoResponse();
+ message.info = object.info !== undefined && object.info !== null ? BaseAccount.fromPartial(object.info) : undefined;
+ return message;
+ },
+ fromAmino(object: QueryAccountInfoResponseAmino): QueryAccountInfoResponse {
+ const message = createBaseQueryAccountInfoResponse();
+ if (object.info !== undefined && object.info !== null) {
+ message.info = BaseAccount.fromAmino(object.info);
+ }
+ return message;
+ },
+ toAmino(message: QueryAccountInfoResponse): QueryAccountInfoResponseAmino {
+ const obj: any = {};
+ obj.info = message.info ? BaseAccount.toAmino(message.info) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: QueryAccountInfoResponseAminoMsg): QueryAccountInfoResponse {
+ return QueryAccountInfoResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: QueryAccountInfoResponse): QueryAccountInfoResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/QueryAccountInfoResponse",
+ value: QueryAccountInfoResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: QueryAccountInfoResponseProtoMsg): QueryAccountInfoResponse {
+ return QueryAccountInfoResponse.decode(message.value);
+ },
+ toProto(message: QueryAccountInfoResponse): Uint8Array {
+ return QueryAccountInfoResponse.encode(message).finish();
+ },
+ toProtoMsg(message: QueryAccountInfoResponse): QueryAccountInfoResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.auth.v1beta1.QueryAccountInfoResponse",
+ value: QueryAccountInfoResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(QueryAccountInfoResponse.typeUrl, QueryAccountInfoResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(QueryAccountInfoResponse.aminoType, QueryAccountInfoResponse.typeUrl);
\ No newline at end of file
diff --git a/libs/injective-query/src/cosmos/authz/v1beta1/authz.ts b/libs/injective-query/src/cosmos/authz/v1beta1/authz.ts
new file mode 100644
index 00000000..e71c3fee
--- /dev/null
+++ b/libs/injective-query/src/cosmos/authz/v1beta1/authz.ts
@@ -0,0 +1,477 @@
+import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any";
+import { Timestamp } from "../../../google/protobuf/timestamp";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial, toTimestamp, fromTimestamp } from "../../../helpers";
+import { GlobalDecoderRegistry } from "../../../registry";
+/**
+ * GenericAuthorization gives the grantee unrestricted permissions to execute
+ * the provided method on behalf of the granter's account.
+ */
+export interface GenericAuthorization {
+ /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */
+ msg: string;
+}
+export interface GenericAuthorizationProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization";
+ value: Uint8Array;
+}
+/**
+ * GenericAuthorization gives the grantee unrestricted permissions to execute
+ * the provided method on behalf of the granter's account.
+ */
+export interface GenericAuthorizationAmino {
+ /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */
+ msg: string;
+}
+export interface GenericAuthorizationAminoMsg {
+ type: "cosmos-sdk/GenericAuthorization";
+ value: GenericAuthorizationAmino;
+}
+/**
+ * Grant gives permissions to execute
+ * the provide method with expiration time.
+ */
+export interface Grant {
+ authorization?: GenericAuthorization | Any | undefined;
+ /**
+ * time when the grant will expire and will be pruned. If null, then the grant
+ * doesn't have a time expiration (other conditions in `authorization`
+ * may apply to invalidate the grant)
+ */
+ expiration?: Date;
+}
+export interface GrantProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.Grant";
+ value: Uint8Array;
+}
+export type GrantEncoded = Omit & {
+ authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined;
+};
+/**
+ * Grant gives permissions to execute
+ * the provide method with expiration time.
+ */
+export interface GrantAmino {
+ authorization?: AnyAmino;
+ /**
+ * time when the grant will expire and will be pruned. If null, then the grant
+ * doesn't have a time expiration (other conditions in `authorization`
+ * may apply to invalidate the grant)
+ */
+ expiration?: string;
+}
+export interface GrantAminoMsg {
+ type: "cosmos-sdk/Grant";
+ value: GrantAmino;
+}
+/**
+ * GrantAuthorization extends a grant with both the addresses of the grantee and granter.
+ * It is used in genesis.proto and query.proto
+ */
+export interface GrantAuthorization {
+ granter: string;
+ grantee: string;
+ authorization?: GenericAuthorization | Any | undefined;
+ expiration?: Date;
+}
+export interface GrantAuthorizationProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization";
+ value: Uint8Array;
+}
+export type GrantAuthorizationEncoded = Omit & {
+ authorization?: GenericAuthorizationProtoMsg | AnyProtoMsg | undefined;
+};
+/**
+ * GrantAuthorization extends a grant with both the addresses of the grantee and granter.
+ * It is used in genesis.proto and query.proto
+ */
+export interface GrantAuthorizationAmino {
+ granter: string;
+ grantee: string;
+ authorization?: AnyAmino;
+ expiration?: string;
+}
+export interface GrantAuthorizationAminoMsg {
+ type: "cosmos-sdk/GrantAuthorization";
+ value: GrantAuthorizationAmino;
+}
+/** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */
+export interface GrantQueueItem {
+ /** msg_type_urls contains the list of TypeURL of a sdk.Msg. */
+ msgTypeUrls: string[];
+}
+export interface GrantQueueItemProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem";
+ value: Uint8Array;
+}
+/** GrantQueueItem contains the list of TypeURL of a sdk.Msg. */
+export interface GrantQueueItemAmino {
+ /** msg_type_urls contains the list of TypeURL of a sdk.Msg. */
+ msg_type_urls: string[];
+}
+export interface GrantQueueItemAminoMsg {
+ type: "cosmos-sdk/GrantQueueItem";
+ value: GrantQueueItemAmino;
+}
+function createBaseGenericAuthorization(): GenericAuthorization {
+ return {
+ msg: ""
+ };
+}
+export const GenericAuthorization = {
+ typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization",
+ aminoType: "cosmos-sdk/GenericAuthorization",
+ is(o: any): o is GenericAuthorization {
+ return o && (o.$typeUrl === GenericAuthorization.typeUrl || typeof o.msg === "string");
+ },
+ isAmino(o: any): o is GenericAuthorizationAmino {
+ return o && (o.$typeUrl === GenericAuthorization.typeUrl || typeof o.msg === "string");
+ },
+ encode(message: GenericAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.msg !== "") {
+ writer.uint32(10).string(message.msg);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): GenericAuthorization {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGenericAuthorization();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.msg = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): GenericAuthorization {
+ const message = createBaseGenericAuthorization();
+ message.msg = object.msg ?? "";
+ return message;
+ },
+ fromAmino(object: GenericAuthorizationAmino): GenericAuthorization {
+ const message = createBaseGenericAuthorization();
+ if (object.msg !== undefined && object.msg !== null) {
+ message.msg = object.msg;
+ }
+ return message;
+ },
+ toAmino(message: GenericAuthorization): GenericAuthorizationAmino {
+ const obj: any = {};
+ obj.msg = message.msg === "" ? undefined : message.msg;
+ return obj;
+ },
+ fromAminoMsg(object: GenericAuthorizationAminoMsg): GenericAuthorization {
+ return GenericAuthorization.fromAmino(object.value);
+ },
+ toAminoMsg(message: GenericAuthorization): GenericAuthorizationAminoMsg {
+ return {
+ type: "cosmos-sdk/GenericAuthorization",
+ value: GenericAuthorization.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GenericAuthorizationProtoMsg): GenericAuthorization {
+ return GenericAuthorization.decode(message.value);
+ },
+ toProto(message: GenericAuthorization): Uint8Array {
+ return GenericAuthorization.encode(message).finish();
+ },
+ toProtoMsg(message: GenericAuthorization): GenericAuthorizationProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.GenericAuthorization",
+ value: GenericAuthorization.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(GenericAuthorization.typeUrl, GenericAuthorization);
+GlobalDecoderRegistry.registerAminoProtoMapping(GenericAuthorization.aminoType, GenericAuthorization.typeUrl);
+function createBaseGrant(): Grant {
+ return {
+ authorization: undefined,
+ expiration: undefined
+ };
+}
+export const Grant = {
+ typeUrl: "/cosmos.authz.v1beta1.Grant",
+ aminoType: "cosmos-sdk/Grant",
+ is(o: any): o is Grant {
+ return o && o.$typeUrl === Grant.typeUrl;
+ },
+ isAmino(o: any): o is GrantAmino {
+ return o && o.$typeUrl === Grant.typeUrl;
+ },
+ encode(message: Grant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.authorization !== undefined) {
+ Any.encode(GlobalDecoderRegistry.wrapAny(message.authorization), writer.uint32(10).fork()).ldelim();
+ }
+ if (message.expiration !== undefined) {
+ Timestamp.encode(toTimestamp(message.expiration), writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Grant {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGrant();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.authorization = GlobalDecoderRegistry.unwrapAny(reader);
+ break;
+ case 2:
+ message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Grant {
+ const message = createBaseGrant();
+ message.authorization = object.authorization !== undefined && object.authorization !== null ? GlobalDecoderRegistry.fromPartial(object.authorization) : undefined;
+ message.expiration = object.expiration ?? undefined;
+ return message;
+ },
+ fromAmino(object: GrantAmino): Grant {
+ const message = createBaseGrant();
+ if (object.authorization !== undefined && object.authorization !== null) {
+ message.authorization = GlobalDecoderRegistry.fromAminoMsg(object.authorization);
+ }
+ if (object.expiration !== undefined && object.expiration !== null) {
+ message.expiration = fromTimestamp(Timestamp.fromAmino(object.expiration));
+ }
+ return message;
+ },
+ toAmino(message: Grant): GrantAmino {
+ const obj: any = {};
+ obj.authorization = message.authorization ? GlobalDecoderRegistry.toAminoMsg(message.authorization) : undefined;
+ obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: GrantAminoMsg): Grant {
+ return Grant.fromAmino(object.value);
+ },
+ toAminoMsg(message: Grant): GrantAminoMsg {
+ return {
+ type: "cosmos-sdk/Grant",
+ value: Grant.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GrantProtoMsg): Grant {
+ return Grant.decode(message.value);
+ },
+ toProto(message: Grant): Uint8Array {
+ return Grant.encode(message).finish();
+ },
+ toProtoMsg(message: Grant): GrantProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.Grant",
+ value: Grant.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(Grant.typeUrl, Grant);
+GlobalDecoderRegistry.registerAminoProtoMapping(Grant.aminoType, Grant.typeUrl);
+function createBaseGrantAuthorization(): GrantAuthorization {
+ return {
+ granter: "",
+ grantee: "",
+ authorization: undefined,
+ expiration: undefined
+ };
+}
+export const GrantAuthorization = {
+ typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization",
+ aminoType: "cosmos-sdk/GrantAuthorization",
+ is(o: any): o is GrantAuthorization {
+ return o && (o.$typeUrl === GrantAuthorization.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string");
+ },
+ isAmino(o: any): o is GrantAuthorizationAmino {
+ return o && (o.$typeUrl === GrantAuthorization.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string");
+ },
+ encode(message: GrantAuthorization, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.granter !== "") {
+ writer.uint32(10).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(18).string(message.grantee);
+ }
+ if (message.authorization !== undefined) {
+ Any.encode(GlobalDecoderRegistry.wrapAny(message.authorization), writer.uint32(26).fork()).ldelim();
+ }
+ if (message.expiration !== undefined) {
+ Timestamp.encode(toTimestamp(message.expiration), writer.uint32(34).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): GrantAuthorization {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGrantAuthorization();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.granter = reader.string();
+ break;
+ case 2:
+ message.grantee = reader.string();
+ break;
+ case 3:
+ message.authorization = GlobalDecoderRegistry.unwrapAny(reader);
+ break;
+ case 4:
+ message.expiration = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): GrantAuthorization {
+ const message = createBaseGrantAuthorization();
+ message.granter = object.granter ?? "";
+ message.grantee = object.grantee ?? "";
+ message.authorization = object.authorization !== undefined && object.authorization !== null ? GlobalDecoderRegistry.fromPartial(object.authorization) : undefined;
+ message.expiration = object.expiration ?? undefined;
+ return message;
+ },
+ fromAmino(object: GrantAuthorizationAmino): GrantAuthorization {
+ const message = createBaseGrantAuthorization();
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ if (object.authorization !== undefined && object.authorization !== null) {
+ message.authorization = GlobalDecoderRegistry.fromAminoMsg(object.authorization);
+ }
+ if (object.expiration !== undefined && object.expiration !== null) {
+ message.expiration = fromTimestamp(Timestamp.fromAmino(object.expiration));
+ }
+ return message;
+ },
+ toAmino(message: GrantAuthorization): GrantAuthorizationAmino {
+ const obj: any = {};
+ obj.granter = message.granter === "" ? undefined : message.granter;
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ obj.authorization = message.authorization ? GlobalDecoderRegistry.toAminoMsg(message.authorization) : undefined;
+ obj.expiration = message.expiration ? Timestamp.toAmino(toTimestamp(message.expiration)) : undefined;
+ return obj;
+ },
+ fromAminoMsg(object: GrantAuthorizationAminoMsg): GrantAuthorization {
+ return GrantAuthorization.fromAmino(object.value);
+ },
+ toAminoMsg(message: GrantAuthorization): GrantAuthorizationAminoMsg {
+ return {
+ type: "cosmos-sdk/GrantAuthorization",
+ value: GrantAuthorization.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GrantAuthorizationProtoMsg): GrantAuthorization {
+ return GrantAuthorization.decode(message.value);
+ },
+ toProto(message: GrantAuthorization): Uint8Array {
+ return GrantAuthorization.encode(message).finish();
+ },
+ toProtoMsg(message: GrantAuthorization): GrantAuthorizationProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.GrantAuthorization",
+ value: GrantAuthorization.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(GrantAuthorization.typeUrl, GrantAuthorization);
+GlobalDecoderRegistry.registerAminoProtoMapping(GrantAuthorization.aminoType, GrantAuthorization.typeUrl);
+function createBaseGrantQueueItem(): GrantQueueItem {
+ return {
+ msgTypeUrls: []
+ };
+}
+export const GrantQueueItem = {
+ typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem",
+ aminoType: "cosmos-sdk/GrantQueueItem",
+ is(o: any): o is GrantQueueItem {
+ return o && (o.$typeUrl === GrantQueueItem.typeUrl || Array.isArray(o.msgTypeUrls) && (!o.msgTypeUrls.length || typeof o.msgTypeUrls[0] === "string"));
+ },
+ isAmino(o: any): o is GrantQueueItemAmino {
+ return o && (o.$typeUrl === GrantQueueItem.typeUrl || Array.isArray(o.msg_type_urls) && (!o.msg_type_urls.length || typeof o.msg_type_urls[0] === "string"));
+ },
+ encode(message: GrantQueueItem, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.msgTypeUrls) {
+ writer.uint32(10).string(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): GrantQueueItem {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGrantQueueItem();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.msgTypeUrls.push(reader.string());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): GrantQueueItem {
+ const message = createBaseGrantQueueItem();
+ message.msgTypeUrls = object.msgTypeUrls?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: GrantQueueItemAmino): GrantQueueItem {
+ const message = createBaseGrantQueueItem();
+ message.msgTypeUrls = object.msg_type_urls?.map(e => e) || [];
+ return message;
+ },
+ toAmino(message: GrantQueueItem): GrantQueueItemAmino {
+ const obj: any = {};
+ if (message.msgTypeUrls) {
+ obj.msg_type_urls = message.msgTypeUrls.map(e => e);
+ } else {
+ obj.msg_type_urls = message.msgTypeUrls;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: GrantQueueItemAminoMsg): GrantQueueItem {
+ return GrantQueueItem.fromAmino(object.value);
+ },
+ toAminoMsg(message: GrantQueueItem): GrantQueueItemAminoMsg {
+ return {
+ type: "cosmos-sdk/GrantQueueItem",
+ value: GrantQueueItem.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: GrantQueueItemProtoMsg): GrantQueueItem {
+ return GrantQueueItem.decode(message.value);
+ },
+ toProto(message: GrantQueueItem): Uint8Array {
+ return GrantQueueItem.encode(message).finish();
+ },
+ toProtoMsg(message: GrantQueueItem): GrantQueueItemProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.GrantQueueItem",
+ value: GrantQueueItem.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(GrantQueueItem.typeUrl, GrantQueueItem);
+GlobalDecoderRegistry.registerAminoProtoMapping(GrantQueueItem.aminoType, GrantQueueItem.typeUrl);
\ No newline at end of file
diff --git a/libs/injective-query/src/cosmos/authz/v1beta1/tx.rpc.func.ts b/libs/injective-query/src/cosmos/authz/v1beta1/tx.rpc.func.ts
new file mode 100644
index 00000000..de818f66
--- /dev/null
+++ b/libs/injective-query/src/cosmos/authz/v1beta1/tx.rpc.func.ts
@@ -0,0 +1,31 @@
+import { buildTx, SigningClientResolver } from "../../../helper-func-types";
+import { buildUseMutation } from "../../../react-query";
+import { toEncoders, toConverters } from "@interchainjs/cosmos/utils";
+import { MsgGrant, MsgExec, MsgRevoke } from "./tx";
+export const createGrant = (clientResolver?: SigningClientResolver) => buildTx({
+ clientResolver,
+ typeUrl: MsgGrant.typeUrl,
+ encoders: toEncoders(MsgGrant),
+ converters: toConverters(MsgGrant)
+});
+export const useGrant = buildUseMutation({
+ builderMutationFn: createGrant
+});
+export const createExec = (clientResolver?: SigningClientResolver) => buildTx({
+ clientResolver,
+ typeUrl: MsgExec.typeUrl,
+ encoders: toEncoders(MsgExec),
+ converters: toConverters(MsgExec)
+});
+export const useExec = buildUseMutation({
+ builderMutationFn: createExec
+});
+export const createRevoke = (clientResolver?: SigningClientResolver) => buildTx({
+ clientResolver,
+ typeUrl: MsgRevoke.typeUrl,
+ encoders: toEncoders(MsgRevoke),
+ converters: toConverters(MsgRevoke)
+});
+export const useRevoke = buildUseMutation({
+ builderMutationFn: createRevoke
+});
\ No newline at end of file
diff --git a/libs/injective-query/src/cosmos/authz/v1beta1/tx.ts b/libs/injective-query/src/cosmos/authz/v1beta1/tx.ts
new file mode 100644
index 00000000..80640ebe
--- /dev/null
+++ b/libs/injective-query/src/cosmos/authz/v1beta1/tx.ts
@@ -0,0 +1,647 @@
+import { Grant, GrantAmino } from "./authz";
+import { Any, AnyProtoMsg, AnyAmino } from "../../../google/protobuf/any";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial, bytesFromBase64, base64FromBytes } from "../../../helpers";
+import { GlobalDecoderRegistry } from "../../../registry";
+/**
+ * MsgGrant is a request type for Grant method. It declares authorization to the grantee
+ * on behalf of the granter with the provided expiration time.
+ */
+export interface MsgGrant {
+ granter: string;
+ grantee: string;
+ grant: Grant;
+}
+export interface MsgGrantProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrant";
+ value: Uint8Array;
+}
+/**
+ * MsgGrant is a request type for Grant method. It declares authorization to the grantee
+ * on behalf of the granter with the provided expiration time.
+ */
+export interface MsgGrantAmino {
+ granter: string;
+ grantee: string;
+ grant: GrantAmino;
+}
+export interface MsgGrantAminoMsg {
+ type: "cosmos-sdk/MsgGrant";
+ value: MsgGrantAmino;
+}
+/** MsgGrantResponse defines the Msg/MsgGrant response type. */
+export interface MsgGrantResponse {}
+export interface MsgGrantResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse";
+ value: Uint8Array;
+}
+/** MsgGrantResponse defines the Msg/MsgGrant response type. */
+export interface MsgGrantResponseAmino {}
+export interface MsgGrantResponseAminoMsg {
+ type: "cosmos-sdk/MsgGrantResponse";
+ value: MsgGrantResponseAmino;
+}
+/**
+ * MsgExec attempts to execute the provided messages using
+ * authorizations granted to the grantee. Each message should have only
+ * one signer corresponding to the granter of the authorization.
+ */
+export interface MsgExec {
+ grantee: string;
+ /**
+ * Execute Msg.
+ * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
+ * triple and validate it.
+ */
+ msgs: (Any)[] | Any[];
+}
+export interface MsgExecProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExec";
+ value: Uint8Array;
+}
+export type MsgExecEncoded = Omit & {
+ /**
+ * Execute Msg.
+ * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
+ * triple and validate it.
+ */
+ msgs: (AnyProtoMsg)[];
+};
+/**
+ * MsgExec attempts to execute the provided messages using
+ * authorizations granted to the grantee. Each message should have only
+ * one signer corresponding to the granter of the authorization.
+ */
+export interface MsgExecAmino {
+ grantee: string;
+ /**
+ * Execute Msg.
+ * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
+ * triple and validate it.
+ */
+ msgs: AnyAmino[];
+}
+export interface MsgExecAminoMsg {
+ type: "cosmos-sdk/MsgExec";
+ value: MsgExecAmino;
+}
+/** MsgExecResponse defines the Msg/MsgExecResponse response type. */
+export interface MsgExecResponse {
+ results: Uint8Array[];
+}
+export interface MsgExecResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse";
+ value: Uint8Array;
+}
+/** MsgExecResponse defines the Msg/MsgExecResponse response type. */
+export interface MsgExecResponseAmino {
+ results: string[];
+}
+export interface MsgExecResponseAminoMsg {
+ type: "cosmos-sdk/MsgExecResponse";
+ value: MsgExecResponseAmino;
+}
+/**
+ * MsgRevoke revokes any authorization with the provided sdk.Msg type on the
+ * granter's account with that has been granted to the grantee.
+ */
+export interface MsgRevoke {
+ granter: string;
+ grantee: string;
+ msgTypeUrl: string;
+}
+export interface MsgRevokeProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke";
+ value: Uint8Array;
+}
+/**
+ * MsgRevoke revokes any authorization with the provided sdk.Msg type on the
+ * granter's account with that has been granted to the grantee.
+ */
+export interface MsgRevokeAmino {
+ granter: string;
+ grantee: string;
+ msg_type_url: string;
+}
+export interface MsgRevokeAminoMsg {
+ type: "cosmos-sdk/MsgRevoke";
+ value: MsgRevokeAmino;
+}
+/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */
+export interface MsgRevokeResponse {}
+export interface MsgRevokeResponseProtoMsg {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse";
+ value: Uint8Array;
+}
+/** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */
+export interface MsgRevokeResponseAmino {}
+export interface MsgRevokeResponseAminoMsg {
+ type: "cosmos-sdk/MsgRevokeResponse";
+ value: MsgRevokeResponseAmino;
+}
+function createBaseMsgGrant(): MsgGrant {
+ return {
+ granter: "",
+ grantee: "",
+ grant: Grant.fromPartial({})
+ };
+}
+export const MsgGrant = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
+ aminoType: "cosmos-sdk/MsgGrant",
+ is(o: any): o is MsgGrant {
+ return o && (o.$typeUrl === MsgGrant.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && Grant.is(o.grant));
+ },
+ isAmino(o: any): o is MsgGrantAmino {
+ return o && (o.$typeUrl === MsgGrant.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && Grant.isAmino(o.grant));
+ },
+ encode(message: MsgGrant, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.granter !== "") {
+ writer.uint32(10).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(18).string(message.grantee);
+ }
+ if (message.grant !== undefined) {
+ Grant.encode(message.grant, writer.uint32(26).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgGrant {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgGrant();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.granter = reader.string();
+ break;
+ case 2:
+ message.grantee = reader.string();
+ break;
+ case 3:
+ message.grant = Grant.decode(reader, reader.uint32());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgGrant {
+ const message = createBaseMsgGrant();
+ message.granter = object.granter ?? "";
+ message.grantee = object.grantee ?? "";
+ message.grant = object.grant !== undefined && object.grant !== null ? Grant.fromPartial(object.grant) : undefined;
+ return message;
+ },
+ fromAmino(object: MsgGrantAmino): MsgGrant {
+ const message = createBaseMsgGrant();
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ if (object.grant !== undefined && object.grant !== null) {
+ message.grant = Grant.fromAmino(object.grant);
+ }
+ return message;
+ },
+ toAmino(message: MsgGrant): MsgGrantAmino {
+ const obj: any = {};
+ obj.granter = message.granter === "" ? undefined : message.granter;
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ obj.grant = message.grant ? Grant.toAmino(message.grant) : Grant.toAmino(Grant.fromPartial({}));
+ return obj;
+ },
+ fromAminoMsg(object: MsgGrantAminoMsg): MsgGrant {
+ return MsgGrant.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgGrant): MsgGrantAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgGrant",
+ value: MsgGrant.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgGrantProtoMsg): MsgGrant {
+ return MsgGrant.decode(message.value);
+ },
+ toProto(message: MsgGrant): Uint8Array {
+ return MsgGrant.encode(message).finish();
+ },
+ toProtoMsg(message: MsgGrant): MsgGrantProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
+ value: MsgGrant.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(MsgGrant.typeUrl, MsgGrant);
+GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrant.aminoType, MsgGrant.typeUrl);
+function createBaseMsgGrantResponse(): MsgGrantResponse {
+ return {};
+}
+export const MsgGrantResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse",
+ aminoType: "cosmos-sdk/MsgGrantResponse",
+ is(o: any): o is MsgGrantResponse {
+ return o && o.$typeUrl === MsgGrantResponse.typeUrl;
+ },
+ isAmino(o: any): o is MsgGrantResponseAmino {
+ return o && o.$typeUrl === MsgGrantResponse.typeUrl;
+ },
+ encode(_: MsgGrantResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgGrantResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgGrantResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): MsgGrantResponse {
+ const message = createBaseMsgGrantResponse();
+ return message;
+ },
+ fromAmino(_: MsgGrantResponseAmino): MsgGrantResponse {
+ const message = createBaseMsgGrantResponse();
+ return message;
+ },
+ toAmino(_: MsgGrantResponse): MsgGrantResponseAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: MsgGrantResponseAminoMsg): MsgGrantResponse {
+ return MsgGrantResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgGrantResponse): MsgGrantResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgGrantResponse",
+ value: MsgGrantResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgGrantResponseProtoMsg): MsgGrantResponse {
+ return MsgGrantResponse.decode(message.value);
+ },
+ toProto(message: MsgGrantResponse): Uint8Array {
+ return MsgGrantResponse.encode(message).finish();
+ },
+ toProtoMsg(message: MsgGrantResponse): MsgGrantResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgGrantResponse",
+ value: MsgGrantResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(MsgGrantResponse.typeUrl, MsgGrantResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(MsgGrantResponse.aminoType, MsgGrantResponse.typeUrl);
+function createBaseMsgExec(): MsgExec {
+ return {
+ grantee: "",
+ msgs: []
+ };
+}
+export const MsgExec = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExec",
+ aminoType: "cosmos-sdk/MsgExec",
+ is(o: any): o is MsgExec {
+ return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.grantee === "string" && Array.isArray(o.msgs) && (!o.msgs.length || Any.is(o.msgs[0])));
+ },
+ isAmino(o: any): o is MsgExecAmino {
+ return o && (o.$typeUrl === MsgExec.typeUrl || typeof o.grantee === "string" && Array.isArray(o.msgs) && (!o.msgs.length || Any.isAmino(o.msgs[0])));
+ },
+ encode(message: MsgExec, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.grantee !== "") {
+ writer.uint32(10).string(message.grantee);
+ }
+ for (const v of message.msgs) {
+ Any.encode(GlobalDecoderRegistry.wrapAny(v!), writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgExec {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgExec();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.grantee = reader.string();
+ break;
+ case 2:
+ message.msgs.push(GlobalDecoderRegistry.unwrapAny(reader));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgExec {
+ const message = createBaseMsgExec();
+ message.grantee = object.grantee ?? "";
+ message.msgs = object.msgs?.map(e => (GlobalDecoderRegistry.fromPartial(e) as any)) || [];
+ return message;
+ },
+ fromAmino(object: MsgExecAmino): MsgExec {
+ const message = createBaseMsgExec();
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ message.msgs = object.msgs?.map(e => GlobalDecoderRegistry.fromAminoMsg(e)) || [];
+ return message;
+ },
+ toAmino(message: MsgExec): MsgExecAmino {
+ const obj: any = {};
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ if (message.msgs) {
+ obj.msgs = message.msgs.map(e => e ? GlobalDecoderRegistry.toAminoMsg(e) : undefined);
+ } else {
+ obj.msgs = message.msgs;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: MsgExecAminoMsg): MsgExec {
+ return MsgExec.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgExec): MsgExecAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgExec",
+ value: MsgExec.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgExecProtoMsg): MsgExec {
+ return MsgExec.decode(message.value);
+ },
+ toProto(message: MsgExec): Uint8Array {
+ return MsgExec.encode(message).finish();
+ },
+ toProtoMsg(message: MsgExec): MsgExecProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExec",
+ value: MsgExec.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(MsgExec.typeUrl, MsgExec);
+GlobalDecoderRegistry.registerAminoProtoMapping(MsgExec.aminoType, MsgExec.typeUrl);
+function createBaseMsgExecResponse(): MsgExecResponse {
+ return {
+ results: []
+ };
+}
+export const MsgExecResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse",
+ aminoType: "cosmos-sdk/MsgExecResponse",
+ is(o: any): o is MsgExecResponse {
+ return o && (o.$typeUrl === MsgExecResponse.typeUrl || Array.isArray(o.results) && (!o.results.length || o.results[0] instanceof Uint8Array || typeof o.results[0] === "string"));
+ },
+ isAmino(o: any): o is MsgExecResponseAmino {
+ return o && (o.$typeUrl === MsgExecResponse.typeUrl || Array.isArray(o.results) && (!o.results.length || o.results[0] instanceof Uint8Array || typeof o.results[0] === "string"));
+ },
+ encode(message: MsgExecResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.results) {
+ writer.uint32(10).bytes(v!);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgExecResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgExecResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.results.push(reader.bytes());
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgExecResponse {
+ const message = createBaseMsgExecResponse();
+ message.results = object.results?.map(e => e) || [];
+ return message;
+ },
+ fromAmino(object: MsgExecResponseAmino): MsgExecResponse {
+ const message = createBaseMsgExecResponse();
+ message.results = object.results?.map(e => bytesFromBase64(e)) || [];
+ return message;
+ },
+ toAmino(message: MsgExecResponse): MsgExecResponseAmino {
+ const obj: any = {};
+ if (message.results) {
+ obj.results = message.results.map(e => base64FromBytes(e));
+ } else {
+ obj.results = message.results;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: MsgExecResponseAminoMsg): MsgExecResponse {
+ return MsgExecResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgExecResponse): MsgExecResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgExecResponse",
+ value: MsgExecResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgExecResponseProtoMsg): MsgExecResponse {
+ return MsgExecResponse.decode(message.value);
+ },
+ toProto(message: MsgExecResponse): Uint8Array {
+ return MsgExecResponse.encode(message).finish();
+ },
+ toProtoMsg(message: MsgExecResponse): MsgExecResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgExecResponse",
+ value: MsgExecResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(MsgExecResponse.typeUrl, MsgExecResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(MsgExecResponse.aminoType, MsgExecResponse.typeUrl);
+function createBaseMsgRevoke(): MsgRevoke {
+ return {
+ granter: "",
+ grantee: "",
+ msgTypeUrl: ""
+ };
+}
+export const MsgRevoke = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
+ aminoType: "cosmos-sdk/MsgRevoke",
+ is(o: any): o is MsgRevoke {
+ return o && (o.$typeUrl === MsgRevoke.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msgTypeUrl === "string");
+ },
+ isAmino(o: any): o is MsgRevokeAmino {
+ return o && (o.$typeUrl === MsgRevoke.typeUrl || typeof o.granter === "string" && typeof o.grantee === "string" && typeof o.msg_type_url === "string");
+ },
+ encode(message: MsgRevoke, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.granter !== "") {
+ writer.uint32(10).string(message.granter);
+ }
+ if (message.grantee !== "") {
+ writer.uint32(18).string(message.grantee);
+ }
+ if (message.msgTypeUrl !== "") {
+ writer.uint32(26).string(message.msgTypeUrl);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgRevoke {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgRevoke();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.granter = reader.string();
+ break;
+ case 2:
+ message.grantee = reader.string();
+ break;
+ case 3:
+ message.msgTypeUrl = reader.string();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): MsgRevoke {
+ const message = createBaseMsgRevoke();
+ message.granter = object.granter ?? "";
+ message.grantee = object.grantee ?? "";
+ message.msgTypeUrl = object.msgTypeUrl ?? "";
+ return message;
+ },
+ fromAmino(object: MsgRevokeAmino): MsgRevoke {
+ const message = createBaseMsgRevoke();
+ if (object.granter !== undefined && object.granter !== null) {
+ message.granter = object.granter;
+ }
+ if (object.grantee !== undefined && object.grantee !== null) {
+ message.grantee = object.grantee;
+ }
+ if (object.msg_type_url !== undefined && object.msg_type_url !== null) {
+ message.msgTypeUrl = object.msg_type_url;
+ }
+ return message;
+ },
+ toAmino(message: MsgRevoke): MsgRevokeAmino {
+ const obj: any = {};
+ obj.granter = message.granter === "" ? undefined : message.granter;
+ obj.grantee = message.grantee === "" ? undefined : message.grantee;
+ obj.msg_type_url = message.msgTypeUrl === "" ? undefined : message.msgTypeUrl;
+ return obj;
+ },
+ fromAminoMsg(object: MsgRevokeAminoMsg): MsgRevoke {
+ return MsgRevoke.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgRevoke): MsgRevokeAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgRevoke",
+ value: MsgRevoke.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgRevokeProtoMsg): MsgRevoke {
+ return MsgRevoke.decode(message.value);
+ },
+ toProto(message: MsgRevoke): Uint8Array {
+ return MsgRevoke.encode(message).finish();
+ },
+ toProtoMsg(message: MsgRevoke): MsgRevokeProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
+ value: MsgRevoke.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(MsgRevoke.typeUrl, MsgRevoke);
+GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevoke.aminoType, MsgRevoke.typeUrl);
+function createBaseMsgRevokeResponse(): MsgRevokeResponse {
+ return {};
+}
+export const MsgRevokeResponse = {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse",
+ aminoType: "cosmos-sdk/MsgRevokeResponse",
+ is(o: any): o is MsgRevokeResponse {
+ return o && o.$typeUrl === MsgRevokeResponse.typeUrl;
+ },
+ isAmino(o: any): o is MsgRevokeResponseAmino {
+ return o && o.$typeUrl === MsgRevokeResponse.typeUrl;
+ },
+ encode(_: MsgRevokeResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): MsgRevokeResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseMsgRevokeResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(_: DeepPartial): MsgRevokeResponse {
+ const message = createBaseMsgRevokeResponse();
+ return message;
+ },
+ fromAmino(_: MsgRevokeResponseAmino): MsgRevokeResponse {
+ const message = createBaseMsgRevokeResponse();
+ return message;
+ },
+ toAmino(_: MsgRevokeResponse): MsgRevokeResponseAmino {
+ const obj: any = {};
+ return obj;
+ },
+ fromAminoMsg(object: MsgRevokeResponseAminoMsg): MsgRevokeResponse {
+ return MsgRevokeResponse.fromAmino(object.value);
+ },
+ toAminoMsg(message: MsgRevokeResponse): MsgRevokeResponseAminoMsg {
+ return {
+ type: "cosmos-sdk/MsgRevokeResponse",
+ value: MsgRevokeResponse.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: MsgRevokeResponseProtoMsg): MsgRevokeResponse {
+ return MsgRevokeResponse.decode(message.value);
+ },
+ toProto(message: MsgRevokeResponse): Uint8Array {
+ return MsgRevokeResponse.encode(message).finish();
+ },
+ toProtoMsg(message: MsgRevokeResponse): MsgRevokeResponseProtoMsg {
+ return {
+ typeUrl: "/cosmos.authz.v1beta1.MsgRevokeResponse",
+ value: MsgRevokeResponse.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(MsgRevokeResponse.typeUrl, MsgRevokeResponse);
+GlobalDecoderRegistry.registerAminoProtoMapping(MsgRevokeResponse.aminoType, MsgRevokeResponse.typeUrl);
\ No newline at end of file
diff --git a/libs/injective-query/src/cosmos/bank/v1beta1/bank.ts b/libs/injective-query/src/cosmos/bank/v1beta1/bank.ts
new file mode 100644
index 00000000..2c115ba3
--- /dev/null
+++ b/libs/injective-query/src/cosmos/bank/v1beta1/bank.ts
@@ -0,0 +1,974 @@
+import { Coin, CoinAmino } from "../../base/v1beta1/coin";
+import { BinaryReader, BinaryWriter } from "../../../binary";
+import { DeepPartial } from "../../../helpers";
+import { GlobalDecoderRegistry } from "../../../registry";
+/** Params defines the parameters for the bank module. */
+export interface Params {
+ /**
+ * Deprecated: Use of SendEnabled in params is deprecated.
+ * For genesis, use the newly added send_enabled field in the genesis object.
+ * Storage, lookup, and manipulation of this information is now in the keeper.
+ *
+ * As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.
+ */
+ /** @deprecated */
+ sendEnabled: SendEnabled[];
+ defaultSendEnabled: boolean;
+}
+export interface ParamsProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Params";
+ value: Uint8Array;
+}
+/** Params defines the parameters for the bank module. */
+export interface ParamsAmino {
+ /**
+ * Deprecated: Use of SendEnabled in params is deprecated.
+ * For genesis, use the newly added send_enabled field in the genesis object.
+ * Storage, lookup, and manipulation of this information is now in the keeper.
+ *
+ * As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.
+ */
+ /** @deprecated */
+ send_enabled: SendEnabledAmino[];
+ default_send_enabled: boolean;
+}
+export interface ParamsAminoMsg {
+ type: "cosmos-sdk/x/bank/Params";
+ value: ParamsAmino;
+}
+/**
+ * SendEnabled maps coin denom to a send_enabled status (whether a denom is
+ * sendable).
+ */
+export interface SendEnabled {
+ denom: string;
+ enabled: boolean;
+}
+export interface SendEnabledProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.SendEnabled";
+ value: Uint8Array;
+}
+/**
+ * SendEnabled maps coin denom to a send_enabled status (whether a denom is
+ * sendable).
+ */
+export interface SendEnabledAmino {
+ denom: string;
+ enabled: boolean;
+}
+export interface SendEnabledAminoMsg {
+ type: "cosmos-sdk/SendEnabled";
+ value: SendEnabledAmino;
+}
+/** Input models transaction input. */
+export interface Input {
+ address: string;
+ coins: Coin[];
+}
+export interface InputProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Input";
+ value: Uint8Array;
+}
+/** Input models transaction input. */
+export interface InputAmino {
+ address: string;
+ coins: CoinAmino[];
+}
+export interface InputAminoMsg {
+ type: "cosmos-sdk/Input";
+ value: InputAmino;
+}
+/** Output models transaction outputs. */
+export interface Output {
+ address: string;
+ coins: Coin[];
+}
+export interface OutputProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Output";
+ value: Uint8Array;
+}
+/** Output models transaction outputs. */
+export interface OutputAmino {
+ address: string;
+ coins: CoinAmino[];
+}
+export interface OutputAminoMsg {
+ type: "cosmos-sdk/Output";
+ value: OutputAmino;
+}
+/**
+ * Supply represents a struct that passively keeps track of the total supply
+ * amounts in the network.
+ * This message is deprecated now that supply is indexed by denom.
+ */
+/** @deprecated */
+export interface Supply {
+ total: Coin[];
+}
+export interface SupplyProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Supply";
+ value: Uint8Array;
+}
+/**
+ * Supply represents a struct that passively keeps track of the total supply
+ * amounts in the network.
+ * This message is deprecated now that supply is indexed by denom.
+ */
+/** @deprecated */
+export interface SupplyAmino {
+ total: CoinAmino[];
+}
+export interface SupplyAminoMsg {
+ type: "cosmos-sdk/Supply";
+ value: SupplyAmino;
+}
+/**
+ * DenomUnit represents a struct that describes a given
+ * denomination unit of the basic token.
+ */
+export interface DenomUnit {
+ /** denom represents the string name of the given denom unit (e.g uatom). */
+ denom: string;
+ /**
+ * exponent represents power of 10 exponent that one must
+ * raise the base_denom to in order to equal the given DenomUnit's denom
+ * 1 denom = 10^exponent base_denom
+ * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
+ * exponent = 6, thus: 1 atom = 10^6 uatom).
+ */
+ exponent: number;
+ /** aliases is a list of string aliases for the given denom */
+ aliases: string[];
+}
+export interface DenomUnitProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.DenomUnit";
+ value: Uint8Array;
+}
+/**
+ * DenomUnit represents a struct that describes a given
+ * denomination unit of the basic token.
+ */
+export interface DenomUnitAmino {
+ /** denom represents the string name of the given denom unit (e.g uatom). */
+ denom: string;
+ /**
+ * exponent represents power of 10 exponent that one must
+ * raise the base_denom to in order to equal the given DenomUnit's denom
+ * 1 denom = 10^exponent base_denom
+ * (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
+ * exponent = 6, thus: 1 atom = 10^6 uatom).
+ */
+ exponent: number;
+ /** aliases is a list of string aliases for the given denom */
+ aliases: string[];
+}
+export interface DenomUnitAminoMsg {
+ type: "cosmos-sdk/DenomUnit";
+ value: DenomUnitAmino;
+}
+/**
+ * Metadata represents a struct that describes
+ * a basic token.
+ */
+export interface Metadata {
+ description: string;
+ /** denom_units represents the list of DenomUnit's for a given coin */
+ denomUnits: DenomUnit[];
+ /** base represents the base denom (should be the DenomUnit with exponent = 0). */
+ base: string;
+ /**
+ * display indicates the suggested denom that should be
+ * displayed in clients.
+ */
+ display: string;
+ /**
+ * name defines the name of the token (eg: Cosmos Atom)
+ *
+ * Since: cosmos-sdk 0.43
+ */
+ name: string;
+ /**
+ * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
+ * be the same as the display.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+ symbol: string;
+ /**
+ * URI to a document (on or off-chain) that contains additional information. Optional.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ uri: string;
+ /**
+ * URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
+ * the document didn't change. Optional.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ uriHash: string;
+}
+export interface MetadataProtoMsg {
+ typeUrl: "/cosmos.bank.v1beta1.Metadata";
+ value: Uint8Array;
+}
+/**
+ * Metadata represents a struct that describes
+ * a basic token.
+ */
+export interface MetadataAmino {
+ description: string;
+ /** denom_units represents the list of DenomUnit's for a given coin */
+ denom_units: DenomUnitAmino[];
+ /** base represents the base denom (should be the DenomUnit with exponent = 0). */
+ base: string;
+ /**
+ * display indicates the suggested denom that should be
+ * displayed in clients.
+ */
+ display: string;
+ /**
+ * name defines the name of the token (eg: Cosmos Atom)
+ *
+ * Since: cosmos-sdk 0.43
+ */
+ name: string;
+ /**
+ * symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
+ * be the same as the display.
+ *
+ * Since: cosmos-sdk 0.43
+ */
+ symbol: string;
+ /**
+ * URI to a document (on or off-chain) that contains additional information. Optional.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ uri: string;
+ /**
+ * URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
+ * the document didn't change. Optional.
+ *
+ * Since: cosmos-sdk 0.46
+ */
+ uri_hash: string;
+}
+export interface MetadataAminoMsg {
+ type: "cosmos-sdk/Metadata";
+ value: MetadataAmino;
+}
+function createBaseParams(): Params {
+ return {
+ sendEnabled: [],
+ defaultSendEnabled: false
+ };
+}
+export const Params = {
+ typeUrl: "/cosmos.bank.v1beta1.Params",
+ aminoType: "cosmos-sdk/x/bank/Params",
+ is(o: any): o is Params {
+ return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.sendEnabled) && (!o.sendEnabled.length || SendEnabled.is(o.sendEnabled[0])) && typeof o.defaultSendEnabled === "boolean");
+ },
+ isAmino(o: any): o is ParamsAmino {
+ return o && (o.$typeUrl === Params.typeUrl || Array.isArray(o.send_enabled) && (!o.send_enabled.length || SendEnabled.isAmino(o.send_enabled[0])) && typeof o.default_send_enabled === "boolean");
+ },
+ encode(message: Params, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ for (const v of message.sendEnabled) {
+ SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.defaultSendEnabled === true) {
+ writer.uint32(16).bool(message.defaultSendEnabled);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Params {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseParams();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.sendEnabled.push(SendEnabled.decode(reader, reader.uint32()));
+ break;
+ case 2:
+ message.defaultSendEnabled = reader.bool();
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Params {
+ const message = createBaseParams();
+ message.sendEnabled = object.sendEnabled?.map(e => SendEnabled.fromPartial(e)) || [];
+ message.defaultSendEnabled = object.defaultSendEnabled ?? false;
+ return message;
+ },
+ fromAmino(object: ParamsAmino): Params {
+ const message = createBaseParams();
+ message.sendEnabled = object.send_enabled?.map(e => SendEnabled.fromAmino(e)) || [];
+ if (object.default_send_enabled !== undefined && object.default_send_enabled !== null) {
+ message.defaultSendEnabled = object.default_send_enabled;
+ }
+ return message;
+ },
+ toAmino(message: Params): ParamsAmino {
+ const obj: any = {};
+ if (message.sendEnabled) {
+ obj.send_enabled = message.sendEnabled.map(e => e ? SendEnabled.toAmino(e) : undefined);
+ } else {
+ obj.send_enabled = message.sendEnabled;
+ }
+ obj.default_send_enabled = message.defaultSendEnabled === false ? undefined : message.defaultSendEnabled;
+ return obj;
+ },
+ fromAminoMsg(object: ParamsAminoMsg): Params {
+ return Params.fromAmino(object.value);
+ },
+ toAminoMsg(message: Params): ParamsAminoMsg {
+ return {
+ type: "cosmos-sdk/x/bank/Params",
+ value: Params.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: ParamsProtoMsg): Params {
+ return Params.decode(message.value);
+ },
+ toProto(message: Params): Uint8Array {
+ return Params.encode(message).finish();
+ },
+ toProtoMsg(message: Params): ParamsProtoMsg {
+ return {
+ typeUrl: "/cosmos.bank.v1beta1.Params",
+ value: Params.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(Params.typeUrl, Params);
+GlobalDecoderRegistry.registerAminoProtoMapping(Params.aminoType, Params.typeUrl);
+function createBaseSendEnabled(): SendEnabled {
+ return {
+ denom: "",
+ enabled: false
+ };
+}
+export const SendEnabled = {
+ typeUrl: "/cosmos.bank.v1beta1.SendEnabled",
+ aminoType: "cosmos-sdk/SendEnabled",
+ is(o: any): o is SendEnabled {
+ return o && (o.$typeUrl === SendEnabled.typeUrl || typeof o.denom === "string" && typeof o.enabled === "boolean");
+ },
+ isAmino(o: any): o is SendEnabledAmino {
+ return o && (o.$typeUrl === SendEnabled.typeUrl || typeof o.denom === "string" && typeof o.enabled === "boolean");
+ },
+ encode(message: SendEnabled, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.denom !== "") {
+ writer.uint32(10).string(message.denom);
+ }
+ if (message.enabled === true) {
+ writer.uint32(16).bool(message.enabled);
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): SendEnabled {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseSendEnabled();
+ while (reader.pos < end) {
+ const 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;
+ },
+ fromPartial(object: DeepPartial): SendEnabled {
+ const message = createBaseSendEnabled();
+ message.denom = object.denom ?? "";
+ message.enabled = object.enabled ?? false;
+ return message;
+ },
+ fromAmino(object: SendEnabledAmino): SendEnabled {
+ const message = createBaseSendEnabled();
+ if (object.denom !== undefined && object.denom !== null) {
+ message.denom = object.denom;
+ }
+ if (object.enabled !== undefined && object.enabled !== null) {
+ message.enabled = object.enabled;
+ }
+ return message;
+ },
+ toAmino(message: SendEnabled): SendEnabledAmino {
+ const obj: any = {};
+ obj.denom = message.denom === "" ? undefined : message.denom;
+ obj.enabled = message.enabled === false ? undefined : message.enabled;
+ return obj;
+ },
+ fromAminoMsg(object: SendEnabledAminoMsg): SendEnabled {
+ return SendEnabled.fromAmino(object.value);
+ },
+ toAminoMsg(message: SendEnabled): SendEnabledAminoMsg {
+ return {
+ type: "cosmos-sdk/SendEnabled",
+ value: SendEnabled.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: SendEnabledProtoMsg): SendEnabled {
+ return SendEnabled.decode(message.value);
+ },
+ toProto(message: SendEnabled): Uint8Array {
+ return SendEnabled.encode(message).finish();
+ },
+ toProtoMsg(message: SendEnabled): SendEnabledProtoMsg {
+ return {
+ typeUrl: "/cosmos.bank.v1beta1.SendEnabled",
+ value: SendEnabled.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(SendEnabled.typeUrl, SendEnabled);
+GlobalDecoderRegistry.registerAminoProtoMapping(SendEnabled.aminoType, SendEnabled.typeUrl);
+function createBaseInput(): Input {
+ return {
+ address: "",
+ coins: []
+ };
+}
+export const Input = {
+ typeUrl: "/cosmos.bank.v1beta1.Input",
+ aminoType: "cosmos-sdk/Input",
+ is(o: any): o is Input {
+ return o && (o.$typeUrl === Input.typeUrl || typeof o.address === "string" && Array.isArray(o.coins) && (!o.coins.length || Coin.is(o.coins[0])));
+ },
+ isAmino(o: any): o is InputAmino {
+ return o && (o.$typeUrl === Input.typeUrl || typeof o.address === "string" && Array.isArray(o.coins) && (!o.coins.length || Coin.isAmino(o.coins[0])));
+ },
+ encode(message: Input, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.address !== "") {
+ writer.uint32(10).string(message.address);
+ }
+ for (const v of message.coins) {
+ Coin.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Input {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseInput();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.address = reader.string();
+ break;
+ case 2:
+ message.coins.push(Coin.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial): Input {
+ const message = createBaseInput();
+ message.address = object.address ?? "";
+ message.coins = object.coins?.map(e => Coin.fromPartial(e)) || [];
+ return message;
+ },
+ fromAmino(object: InputAmino): Input {
+ const message = createBaseInput();
+ if (object.address !== undefined && object.address !== null) {
+ message.address = object.address;
+ }
+ message.coins = object.coins?.map(e => Coin.fromAmino(e)) || [];
+ return message;
+ },
+ toAmino(message: Input): InputAmino {
+ const obj: any = {};
+ obj.address = message.address === "" ? undefined : message.address;
+ if (message.coins) {
+ obj.coins = message.coins.map(e => e ? Coin.toAmino(e) : undefined);
+ } else {
+ obj.coins = message.coins;
+ }
+ return obj;
+ },
+ fromAminoMsg(object: InputAminoMsg): Input {
+ return Input.fromAmino(object.value);
+ },
+ toAminoMsg(message: Input): InputAminoMsg {
+ return {
+ type: "cosmos-sdk/Input",
+ value: Input.toAmino(message)
+ };
+ },
+ fromProtoMsg(message: InputProtoMsg): Input {
+ return Input.decode(message.value);
+ },
+ toProto(message: Input): Uint8Array {
+ return Input.encode(message).finish();
+ },
+ toProtoMsg(message: Input): InputProtoMsg {
+ return {
+ typeUrl: "/cosmos.bank.v1beta1.Input",
+ value: Input.encode(message).finish()
+ };
+ }
+};
+GlobalDecoderRegistry.register(Input.typeUrl, Input);
+GlobalDecoderRegistry.registerAminoProtoMapping(Input.aminoType, Input.typeUrl);
+function createBaseOutput(): Output {
+ return {
+ address: "",
+ coins: []
+ };
+}
+export const Output = {
+ typeUrl: "/cosmos.bank.v1beta1.Output",
+ aminoType: "cosmos-sdk/Output",
+ is(o: any): o is Output {
+ return o && (o.$typeUrl === Output.typeUrl || typeof o.address === "string" && Array.isArray(o.coins) && (!o.coins.length || Coin.is(o.coins[0])));
+ },
+ isAmino(o: any): o is OutputAmino {
+ return o && (o.$typeUrl === Output.typeUrl || typeof o.address === "string" && Array.isArray(o.coins) && (!o.coins.length || Coin.isAmino(o.coins[0])));
+ },
+ encode(message: Output, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
+ if (message.address !== "") {
+ writer.uint32(10).string(message.address);
+ }
+ for (const v of message.coins) {
+ Coin.encode(v!, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+ decode(input: BinaryReader | Uint8Array, length?: number): Output {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseOutput();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ message.address = reader.string();
+ break;
+ case 2:
+ message.coins.push(Coin.decode(reader, reader.uint32()));
+ break;
+ default:
+ reader.skipType(tag & 7);
+ break;
+ }
+ }
+ return message;
+ },
+ fromPartial(object: DeepPartial