From 1c51f7e743329a1ef65de9160ba26677517de70b Mon Sep 17 00:00:00 2001 From: willclarktech Date: Wed, 15 Jul 2020 18:34:18 +0200 Subject: [PATCH 1/5] proto-signing: Upgrade protobuf.js to 6.10.0 --- packages/proto-signing/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/proto-signing/package.json b/packages/proto-signing/package.json index a7a6fea5e1..6d3d2295f0 100644 --- a/packages/proto-signing/package.json +++ b/packages/proto-signing/package.json @@ -43,7 +43,7 @@ "postdefine-proto": "prettier --write \"src/generated/codecimpl.*\"" }, "dependencies": { - "protobufjs": "~6.9.0" + "protobufjs": "~6.10.0" }, "devDependencies": { "@cosmjs/encoding": "^0.21.1", diff --git a/yarn.lock b/yarn.lock index 7fc400fa92..09347cd39e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6708,10 +6708,10 @@ proto-list@~1.2.1: resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= -protobufjs@~6.9.0: - version "6.9.0" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.9.0.tgz#c08b2bf636682598e6fabbf0edb0b1256ff090bd" - integrity sha512-LlGVfEWDXoI/STstRDdZZKb/qusoAWUnmLg9R8OLSO473mBLWHowx8clbX5/+mKDEI+v7GzjoK9tRPZMMcoTrg== +protobufjs@~6.10.0: + version "6.10.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.10.0.tgz#b0698a2a91fc597e2dc625dcf3539ece9675c8fd" + integrity sha512-Hdz1+CXkrlmGDKkP6DczxysdnUyUuhM1mjeaydnBxOcjxQPbJldLZ8eGE1gX0UTsgv+0QkFfn6dioo5yt9XORw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" From 6e7dd7d9a08749c1ce59498f41bcef2468883130 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 16 Jul 2020 13:16:36 +0200 Subject: [PATCH 2/5] proto-signing: Update predefine-proto script --- packages/proto-signing/package.json | 3 +- .../proto-signing/scripts/predefine-proto.sh | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 packages/proto-signing/scripts/predefine-proto.sh diff --git a/packages/proto-signing/package.json b/packages/proto-signing/package.json index 6d3d2295f0..142f148c48 100644 --- a/packages/proto-signing/package.json +++ b/packages/proto-signing/package.json @@ -37,8 +37,9 @@ "test": "yarn build-or-skip && yarn test-node", "coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet", "pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js", + "preget-proto": "rm -rf proto", "get-proto": "REF=master ./scripts/get-proto.sh", - "predefine-proto": "mkdir -p src/generated && pbjs -t static-module -w commonjs -o src/generated/codecimpl.tmp.js --sparse --no-beautify --no-delimited --no-verify --no-convert ./proto/cosmos/cosmos-sdk/{x/bank/types/types.proto,types/types.proto,types/tx/types.proto,types/tx/signing/types.proto,third_party/proto/tendermint/**/*.proto,crypto/types/types.proto}", + "predefine-proto": "./scripts/predefine-proto.sh", "define-proto": "pbts src/generated/codecimpl.tmp.js -o src/generated/codecimpl.d.ts && tsc --removeComments --outFile src/generated/codecimpl.js --allowJs src/generated/codecimpl.tmp.js && rm src/generated/codecimpl.tmp.js", "postdefine-proto": "prettier --write \"src/generated/codecimpl.*\"" }, diff --git a/packages/proto-signing/scripts/predefine-proto.sh b/packages/proto-signing/scripts/predefine-proto.sh new file mode 100755 index 0000000000..7d4814cda4 --- /dev/null +++ b/packages/proto-signing/scripts/predefine-proto.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck > /dev/null && shellcheck "$0" + +GENERATED_DIR="./tmp" +ROOT_PROTO_DIR="./proto/cosmos/cosmos-sdk" +COSMOS_PROTO_DIR="$ROOT_PROTO_DIR/proto/cosmos" +TENDERMINT_PROTO_DIR="$ROOT_PROTO_DIR/third_party/proto/tendermint" +GOOGLE_PROTO_DIR="$ROOT_PROTO_DIR/third_party/proto/google" + +mkdir -p "$GENERATED_DIR" +pbjs \ + -t static-module \ + --es6 \ + -w commonjs \ + -o "$GENERATED_DIR/codecimpl.js" \ + --sparse \ + --no-beautify \ + --no-delimited \ + --no-verify \ + --no-convert \ + "$COSMOS_PROTO_DIR/cosmos.proto" \ + "$COSMOS_PROTO_DIR/bank/bank.proto" \ + "$COSMOS_PROTO_DIR/crypto/crypto.proto" \ + "$COSMOS_PROTO_DIR/tx/tx.proto" \ + "$COSMOS_PROTO_DIR/tx/signing/signing.proto" \ + "$TENDERMINT_PROTO_DIR/abci/types/types.proto" \ + "$TENDERMINT_PROTO_DIR/crypto/merkle/merkle.proto" \ + "$TENDERMINT_PROTO_DIR/libs/kv/types.proto" \ + "$GOOGLE_PROTO_DIR/protobuf/any.proto" From e8651635589a3a42cd2b469954a6db7c5b66fd69 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 16 Jul 2020 15:09:04 +0200 Subject: [PATCH 3/5] proto-signing: Update define-proto script --- packages/proto-signing/.gitignore | 1 + packages/proto-signing/package.json | 2 +- packages/proto-signing/scripts/define-proto.sh | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 packages/proto-signing/scripts/define-proto.sh diff --git a/packages/proto-signing/.gitignore b/packages/proto-signing/.gitignore index 1f68d6fa5e..e3cc434188 100644 --- a/packages/proto-signing/.gitignore +++ b/packages/proto-signing/.gitignore @@ -2,3 +2,4 @@ build/ dist/ docs/ proto/ +tmp/ diff --git a/packages/proto-signing/package.json b/packages/proto-signing/package.json index 142f148c48..c86f41efb5 100644 --- a/packages/proto-signing/package.json +++ b/packages/proto-signing/package.json @@ -40,7 +40,7 @@ "preget-proto": "rm -rf proto", "get-proto": "REF=master ./scripts/get-proto.sh", "predefine-proto": "./scripts/predefine-proto.sh", - "define-proto": "pbts src/generated/codecimpl.tmp.js -o src/generated/codecimpl.d.ts && tsc --removeComments --outFile src/generated/codecimpl.js --allowJs src/generated/codecimpl.tmp.js && rm src/generated/codecimpl.tmp.js", + "define-proto": "./scripts/define-proto.sh", "postdefine-proto": "prettier --write \"src/generated/codecimpl.*\"" }, "dependencies": { diff --git a/packages/proto-signing/scripts/define-proto.sh b/packages/proto-signing/scripts/define-proto.sh new file mode 100755 index 0000000000..3c9ae8e7c1 --- /dev/null +++ b/packages/proto-signing/scripts/define-proto.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck > /dev/null && shellcheck "$0" + +TMP_DIR="./tmp" +JS_SOURCE_FILE="$TMP_DIR/codecimpl.js" +DEFINITIONS_FILE="$TMP_DIR/codecimpl.d.ts" +OUTPUT_DIR="./src/generated/" + + +pbts "$JS_SOURCE_FILE" -o "$DEFINITIONS_FILE" +tsc --removeComments --outDir "$OUTPUT_DIR" --allowJs "$JS_SOURCE_FILE" +cp "$DEFINITIONS_FILE" "$OUTPUT_DIR" +rm "$DEFINITIONS_FILE" "$JS_SOURCE_FILE" From 363790d00f8861544b5d0670e9f60b38969b3acb Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 16 Jul 2020 15:09:20 +0200 Subject: [PATCH 4/5] proto-signing: Update generated proto files --- .../src/generated/codecimpl.d.ts | 2927 +++++++++-------- .../proto-signing/src/generated/codecimpl.js | 2333 ++++++------- 2 files changed, 2732 insertions(+), 2528 deletions(-) diff --git a/packages/proto-signing/src/generated/codecimpl.d.ts b/packages/proto-signing/src/generated/codecimpl.d.ts index 8ae30088f4..63a4519bbc 100644 --- a/packages/proto-signing/src/generated/codecimpl.d.ts +++ b/packages/proto-signing/src/generated/codecimpl.d.ts @@ -1,1489 +1,1596 @@ import * as $protobuf from "protobufjs"; -/** Namespace cosmos_sdk. */ -export namespace cosmos_sdk { - /** Namespace x. */ - namespace x { - /** Namespace bank. */ - namespace bank { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgSend. */ - interface IMsgSend { - /** MsgSend fromAddress */ - fromAddress?: Uint8Array | null; +/** Namespace cosmos. */ +export namespace cosmos { + /** Properties of a Coin. */ + interface ICoin { + /** Coin denom */ + denom?: string | null; - /** MsgSend toAddress */ - toAddress?: Uint8Array | null; - - /** MsgSend amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a MsgSend. */ - class MsgSend implements IMsgSend { - /** - * Constructs a new MsgSend. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IMsgSend); - - /** MsgSend fromAddress. */ - public fromAddress: Uint8Array; - - /** MsgSend toAddress. */ - public toAddress: Uint8Array; - - /** MsgSend amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new MsgSend instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSend instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IMsgSend): cosmos_sdk.x.bank.v1.MsgSend; - - /** - * Encodes the specified MsgSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. - * @param m MsgSend message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IMsgSend, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSend message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.x.bank.v1.MsgSend; - } - - /** Properties of an Input. */ - interface IInput { - /** Input address */ - address?: Uint8Array | null; - - /** Input coins */ - coins?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents an Input. */ - class Input implements IInput { - /** - * Constructs a new Input. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IInput); - - /** Input address. */ - public address: Uint8Array; - - /** Input coins. */ - public coins: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Input instance using the specified properties. - * @param [properties] Properties to set - * @returns Input instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IInput): cosmos_sdk.x.bank.v1.Input; - - /** - * Encodes the specified Input message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. - * @param m Input message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IInput, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Input message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.x.bank.v1.Input; - } - - /** Properties of an Output. */ - interface IOutput { - /** Output address */ - address?: Uint8Array | null; - - /** Output coins */ - coins?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents an Output. */ - class Output implements IOutput { - /** - * Constructs a new Output. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IOutput); - - /** Output address. */ - public address: Uint8Array; - - /** Output coins. */ - public coins: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Output instance using the specified properties. - * @param [properties] Properties to set - * @returns Output instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IOutput): cosmos_sdk.x.bank.v1.Output; - - /** - * Encodes the specified Output message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. - * @param m Output message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IOutput, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Output message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.x.bank.v1.Output; - } - - /** Properties of a MsgMultiSend. */ - interface IMsgMultiSend { - /** MsgMultiSend inputs */ - inputs?: cosmos_sdk.x.bank.v1.IInput[] | null; - - /** MsgMultiSend outputs */ - outputs?: cosmos_sdk.x.bank.v1.IOutput[] | null; - } - - /** Represents a MsgMultiSend. */ - class MsgMultiSend implements IMsgMultiSend { - /** - * Constructs a new MsgMultiSend. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IMsgMultiSend); - - /** MsgMultiSend inputs. */ - public inputs: cosmos_sdk.x.bank.v1.IInput[]; - - /** MsgMultiSend outputs. */ - public outputs: cosmos_sdk.x.bank.v1.IOutput[]; - - /** - * Creates a new MsgMultiSend instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgMultiSend instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IMsgMultiSend, - ): cosmos_sdk.x.bank.v1.MsgMultiSend; - - /** - * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. - * @param m MsgMultiSend message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IMsgMultiSend, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgMultiSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.x.bank.v1.MsgMultiSend; - } - - /** Properties of a Supply. */ - interface ISupply { - /** Supply total */ - total?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a Supply. */ - class Supply implements ISupply { - /** - * Constructs a new Supply. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.ISupply); - - /** Supply total. */ - public total: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Supply instance using the specified properties. - * @param [properties] Properties to set - * @returns Supply instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.ISupply): cosmos_sdk.x.bank.v1.Supply; - - /** - * Encodes the specified Supply message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. - * @param m Supply message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.ISupply, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Supply message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.x.bank.v1.Supply; - } - } - } + /** Coin amount */ + amount?: string | null; } - /** Namespace v1. */ - namespace v1 { - /** Properties of a Coin. */ - interface ICoin { - /** Coin denom */ - denom?: string | null; - - /** Coin amount */ - amount?: string | null; - } - - /** Represents a Coin. */ - class Coin implements ICoin { - /** - * Constructs a new Coin. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.ICoin); - - /** Coin denom. */ - public denom: string; - - /** Coin amount. */ - public amount: string; - - /** - * Creates a new Coin instance using the specified properties. - * @param [properties] Properties to set - * @returns Coin instance - */ - public static create(properties?: cosmos_sdk.v1.ICoin): cosmos_sdk.v1.Coin; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. - * @param m Coin message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.ICoin, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Coin message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Coin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.Coin; - } - - /** Properties of a DecCoin. */ - interface IDecCoin { - /** DecCoin denom */ - denom?: string | null; - - /** DecCoin amount */ - amount?: string | null; - } - - /** Represents a DecCoin. */ - class DecCoin implements IDecCoin { - /** - * Constructs a new DecCoin. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IDecCoin); - - /** DecCoin denom. */ - public denom: string; - - /** DecCoin amount. */ - public amount: string; - - /** - * Creates a new DecCoin instance using the specified properties. - * @param [properties] Properties to set - * @returns DecCoin instance - */ - public static create(properties?: cosmos_sdk.v1.IDecCoin): cosmos_sdk.v1.DecCoin; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. - * @param m DecCoin message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IDecCoin, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DecCoin message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DecCoin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.DecCoin; - } - - /** Properties of an IntProto. */ - interface IIntProto { - /** IntProto int */ - int?: string | null; - } - - /** Represents an IntProto. */ - class IntProto implements IIntProto { - /** - * Constructs a new IntProto. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IIntProto); - - /** IntProto int. */ - public int: string; - - /** - * Creates a new IntProto instance using the specified properties. - * @param [properties] Properties to set - * @returns IntProto instance - */ - public static create(properties?: cosmos_sdk.v1.IIntProto): cosmos_sdk.v1.IntProto; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. - * @param m IntProto message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IIntProto, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IntProto message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns IntProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.IntProto; - } - - /** Properties of a DecProto. */ - interface IDecProto { - /** DecProto dec */ - dec?: string | null; - } - - /** Represents a DecProto. */ - class DecProto implements IDecProto { - /** - * Constructs a new DecProto. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IDecProto); - - /** DecProto dec. */ - public dec: string; - - /** - * Creates a new DecProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DecProto instance - */ - public static create(properties?: cosmos_sdk.v1.IDecProto): cosmos_sdk.v1.DecProto; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. - * @param m DecProto message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IDecProto, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DecProto message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DecProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.DecProto; - } - - /** Properties of a ValAddresses. */ - interface IValAddresses { - /** ValAddresses addresses */ - addresses?: Uint8Array[] | null; - } - - /** Represents a ValAddresses. */ - class ValAddresses implements IValAddresses { - /** - * Constructs a new ValAddresses. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IValAddresses); - - /** ValAddresses addresses. */ - public addresses: Uint8Array[]; - - /** - * Creates a new ValAddresses instance using the specified properties. - * @param [properties] Properties to set - * @returns ValAddresses instance - */ - public static create(properties?: cosmos_sdk.v1.IValAddresses): cosmos_sdk.v1.ValAddresses; - - /** - * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. - * @param m ValAddresses message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IValAddresses, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValAddresses message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValAddresses - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.ValAddresses; - } - - /** Properties of a GasInfo. */ - interface IGasInfo { - /** GasInfo gasWanted */ - gasWanted?: number | Long | null; - - /** GasInfo gasUsed */ - gasUsed?: number | Long | null; - } - - /** Represents a GasInfo. */ - class GasInfo implements IGasInfo { - /** - * Constructs a new GasInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IGasInfo); - - /** GasInfo gasWanted. */ - public gasWanted: number | Long; - - /** GasInfo gasUsed. */ - public gasUsed: number | Long; - - /** - * Creates a new GasInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GasInfo instance - */ - public static create(properties?: cosmos_sdk.v1.IGasInfo): cosmos_sdk.v1.GasInfo; - - /** - * Encodes the specified GasInfo message. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. - * @param m GasInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IGasInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GasInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns GasInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.GasInfo; - } - - /** Properties of a Result. */ - interface IResult { - /** Result data */ - data?: Uint8Array | null; - - /** Result log */ - log?: string | null; - - /** Result events */ - events?: tendermint.abci.types.IEvent[] | null; - } - - /** Represents a Result. */ - class Result implements IResult { - /** - * Constructs a new Result. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IResult); - - /** Result data. */ - public data: Uint8Array; - - /** Result log. */ - public log: string; - - /** Result events. */ - public events: tendermint.abci.types.IEvent[]; - - /** - * Creates a new Result instance using the specified properties. - * @param [properties] Properties to set - * @returns Result instance - */ - public static create(properties?: cosmos_sdk.v1.IResult): cosmos_sdk.v1.Result; - - /** - * Encodes the specified Result message. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. - * @param m Result message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IResult, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Result message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Result - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.Result; - } - - /** Properties of a SimulationResponse. */ - interface ISimulationResponse { - /** SimulationResponse gasInfo */ - gasInfo?: cosmos_sdk.v1.IGasInfo | null; - - /** SimulationResponse result */ - result?: cosmos_sdk.v1.IResult | null; - } - - /** Represents a SimulationResponse. */ - class SimulationResponse implements ISimulationResponse { - /** - * Constructs a new SimulationResponse. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.ISimulationResponse); - - /** SimulationResponse gasInfo. */ - public gasInfo?: cosmos_sdk.v1.IGasInfo | null; - - /** SimulationResponse result. */ - public result?: cosmos_sdk.v1.IResult | null; - - /** - * Creates a new SimulationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulationResponse instance - */ - public static create(properties?: cosmos_sdk.v1.ISimulationResponse): cosmos_sdk.v1.SimulationResponse; - - /** - * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. - * @param m SimulationResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.ISimulationResponse, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SimulationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.SimulationResponse; - } - - /** Properties of a MsgData. */ - interface IMsgData { - /** MsgData msgType */ - msgType?: string | null; - - /** MsgData data */ - data?: Uint8Array | null; - } - - /** Represents a MsgData. */ - class MsgData implements IMsgData { - /** - * Constructs a new MsgData. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IMsgData); - - /** MsgData msgType. */ - public msgType: string; - - /** MsgData data. */ - public data: Uint8Array; - - /** - * Creates a new MsgData instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgData instance - */ - public static create(properties?: cosmos_sdk.v1.IMsgData): cosmos_sdk.v1.MsgData; - - /** - * Encodes the specified MsgData message. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. - * @param m MsgData message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IMsgData, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgData message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.MsgData; - } - - /** Properties of a TxData. */ - interface ITxData { - /** TxData data */ - data?: cosmos_sdk.v1.IMsgData[] | null; - } - - /** Represents a TxData. */ - class TxData implements ITxData { - /** - * Constructs a new TxData. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.ITxData); - - /** TxData data. */ - public data: cosmos_sdk.v1.IMsgData[]; - - /** - * Creates a new TxData instance using the specified properties. - * @param [properties] Properties to set - * @returns TxData instance - */ - public static create(properties?: cosmos_sdk.v1.ITxData): cosmos_sdk.v1.TxData; - - /** - * Encodes the specified TxData message. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. - * @param m TxData message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.ITxData, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TxData message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns TxData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.TxData; - } + /** Represents a Coin. */ + class Coin implements ICoin { + /** + * Constructs a new Coin. + * @param [p] Properties to set + */ + constructor(p?: cosmos.ICoin); + + /** Coin denom. */ + public denom: string; + + /** Coin amount. */ + public amount: string; + + /** + * Creates a new Coin instance using the specified properties. + * @param [properties] Properties to set + * @returns Coin instance + */ + public static create(properties?: cosmos.ICoin): cosmos.Coin; + + /** + * Encodes the specified Coin message. Does not implicitly {@link cosmos.Coin.verify|verify} messages. + * @param m Coin message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.ICoin, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.Coin; } - /** Namespace tx. */ - namespace tx { - /** Namespace v1. */ - namespace v1 { - /** Properties of a Tx. */ - interface ITx { - /** Tx body */ - body?: cosmos_sdk.tx.v1.ITxBody | null; - - /** Tx authInfo */ - authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - - /** Tx signatures */ - signatures?: Uint8Array[] | null; - } - - /** Represents a Tx. */ - class Tx implements ITx { - /** - * Constructs a new Tx. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ITx); - - /** Tx body. */ - public body?: cosmos_sdk.tx.v1.ITxBody | null; - - /** Tx authInfo. */ - public authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - - /** Tx signatures. */ - public signatures: Uint8Array[]; - - /** - * Creates a new Tx instance using the specified properties. - * @param [properties] Properties to set - * @returns Tx instance - */ - public static create(properties?: cosmos_sdk.tx.v1.ITx): cosmos_sdk.tx.v1.Tx; - - /** - * Encodes the specified Tx message. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. - * @param m Tx message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ITx, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tx message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Tx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.Tx; - } - - /** Properties of a SignDoc. */ - interface ISignDoc { - /** SignDoc body */ - body?: cosmos_sdk.tx.v1.ITxBody | null; - - /** SignDoc authInfo */ - authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - - /** SignDoc chainId */ - chainId?: string | null; - - /** SignDoc accountNumber */ - accountNumber?: number | Long | null; - - /** SignDoc accountSequence */ - accountSequence?: number | Long | null; - } - - /** Represents a SignDoc. */ - class SignDoc implements ISignDoc { - /** - * Constructs a new SignDoc. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ISignDoc); - - /** SignDoc body. */ - public body?: cosmos_sdk.tx.v1.ITxBody | null; - - /** SignDoc authInfo. */ - public authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - - /** SignDoc chainId. */ - public chainId: string; - - /** SignDoc accountNumber. */ - public accountNumber: number | Long; - - /** SignDoc accountSequence. */ - public accountSequence: number | Long; - - /** - * Creates a new SignDoc instance using the specified properties. - * @param [properties] Properties to set - * @returns SignDoc instance - */ - public static create(properties?: cosmos_sdk.tx.v1.ISignDoc): cosmos_sdk.tx.v1.SignDoc; - - /** - * Encodes the specified SignDoc message. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. - * @param m SignDoc message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ISignDoc, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignDoc message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SignDoc - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.SignDoc; - } - - /** Properties of a TxBody. */ - interface ITxBody { - /** TxBody messages */ - messages?: google.protobuf.IAny[] | null; - - /** TxBody memo */ - memo?: string | null; - - /** TxBody timeoutHeight */ - timeoutHeight?: number | Long | null; - - /** TxBody extensionOptions */ - extensionOptions?: google.protobuf.IAny[] | null; - - /** TxBody nonCriticalExtensionOptions */ - nonCriticalExtensionOptions?: google.protobuf.IAny[] | null; - } - - /** Represents a TxBody. */ - class TxBody implements ITxBody { - /** - * Constructs a new TxBody. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ITxBody); - - /** TxBody messages. */ - public messages: google.protobuf.IAny[]; - - /** TxBody memo. */ - public memo: string; - - /** TxBody timeoutHeight. */ - public timeoutHeight: number | Long; - - /** TxBody extensionOptions. */ - public extensionOptions: google.protobuf.IAny[]; - - /** TxBody nonCriticalExtensionOptions. */ - public nonCriticalExtensionOptions: google.protobuf.IAny[]; - - /** - * Creates a new TxBody instance using the specified properties. - * @param [properties] Properties to set - * @returns TxBody instance - */ - public static create(properties?: cosmos_sdk.tx.v1.ITxBody): cosmos_sdk.tx.v1.TxBody; - - /** - * Encodes the specified TxBody message. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. - * @param m TxBody message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ITxBody, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TxBody message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns TxBody - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.TxBody; - } - - /** Properties of an AuthInfo. */ - interface IAuthInfo { - /** AuthInfo signerInfos */ - signerInfos?: cosmos_sdk.tx.v1.ISignerInfo[] | null; - - /** AuthInfo fee */ - fee?: cosmos_sdk.tx.v1.IFee | null; - } - - /** Represents an AuthInfo. */ - class AuthInfo implements IAuthInfo { - /** - * Constructs a new AuthInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.IAuthInfo); - - /** AuthInfo signerInfos. */ - public signerInfos: cosmos_sdk.tx.v1.ISignerInfo[]; - - /** AuthInfo fee. */ - public fee?: cosmos_sdk.tx.v1.IFee | null; - - /** - * Creates a new AuthInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AuthInfo instance - */ - public static create(properties?: cosmos_sdk.tx.v1.IAuthInfo): cosmos_sdk.tx.v1.AuthInfo; - - /** - * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. - * @param m AuthInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.IAuthInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuthInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns AuthInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.AuthInfo; - } - - /** Properties of a SignerInfo. */ - interface ISignerInfo { - /** SignerInfo publicKey */ - publicKey?: google.protobuf.IAny | null; - - /** SignerInfo modeInfo */ - modeInfo?: cosmos_sdk.tx.v1.IModeInfo | null; - } - - /** Represents a SignerInfo. */ - class SignerInfo implements ISignerInfo { - /** - * Constructs a new SignerInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ISignerInfo); - - /** SignerInfo publicKey. */ - public publicKey?: google.protobuf.IAny | null; - - /** SignerInfo modeInfo. */ - public modeInfo?: cosmos_sdk.tx.v1.IModeInfo | null; - - /** - * Creates a new SignerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SignerInfo instance - */ - public static create(properties?: cosmos_sdk.tx.v1.ISignerInfo): cosmos_sdk.tx.v1.SignerInfo; - - /** - * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. - * @param m SignerInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ISignerInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignerInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SignerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.SignerInfo; - } - - /** Properties of a ModeInfo. */ - interface IModeInfo { - /** ModeInfo single */ - single?: cosmos_sdk.tx.v1.ModeInfo.ISingle | null; - - /** ModeInfo multi */ - multi?: cosmos_sdk.tx.v1.ModeInfo.IMulti | null; - } - - /** Represents a ModeInfo. */ - class ModeInfo implements IModeInfo { - /** - * Constructs a new ModeInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.IModeInfo); - - /** ModeInfo single. */ - public single?: cosmos_sdk.tx.v1.ModeInfo.ISingle | null; - - /** ModeInfo multi. */ - public multi?: cosmos_sdk.tx.v1.ModeInfo.IMulti | null; - - /** ModeInfo sum. */ - public sum?: "single" | "multi"; - - /** - * Creates a new ModeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ModeInfo instance - */ - public static create(properties?: cosmos_sdk.tx.v1.IModeInfo): cosmos_sdk.tx.v1.ModeInfo; - - /** - * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. - * @param m ModeInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.IModeInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModeInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ModeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.ModeInfo; - } - - namespace ModeInfo { - /** Properties of a Single. */ - interface ISingle { - /** Single mode */ - mode?: cosmos_sdk.tx.signing.v1.SignMode | null; - } - - /** Represents a Single. */ - class Single implements ISingle { - /** - * Constructs a new Single. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ModeInfo.ISingle); - - /** Single mode. */ - public mode: cosmos_sdk.tx.signing.v1.SignMode; - - /** - * Creates a new Single instance using the specified properties. - * @param [properties] Properties to set - * @returns Single instance - */ - public static create( - properties?: cosmos_sdk.tx.v1.ModeInfo.ISingle, - ): cosmos_sdk.tx.v1.ModeInfo.Single; - - /** - * Encodes the specified Single message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. - * @param m Single message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ModeInfo.ISingle, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Single message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Single - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.tx.v1.ModeInfo.Single; - } - - /** Properties of a Multi. */ - interface IMulti { - /** Multi bitarray */ - bitarray?: cosmos_sdk.crypto.v1.ICompactBitArray | null; - - /** Multi modeInfos */ - modeInfos?: cosmos_sdk.tx.v1.IModeInfo[] | null; - } - - /** Represents a Multi. */ - class Multi implements IMulti { - /** - * Constructs a new Multi. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ModeInfo.IMulti); - - /** Multi bitarray. */ - public bitarray?: cosmos_sdk.crypto.v1.ICompactBitArray | null; - - /** Multi modeInfos. */ - public modeInfos: cosmos_sdk.tx.v1.IModeInfo[]; - - /** - * Creates a new Multi instance using the specified properties. - * @param [properties] Properties to set - * @returns Multi instance - */ - public static create( - properties?: cosmos_sdk.tx.v1.ModeInfo.IMulti, - ): cosmos_sdk.tx.v1.ModeInfo.Multi; - - /** - * Encodes the specified Multi message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. - * @param m Multi message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ModeInfo.IMulti, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Multi message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Multi - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.ModeInfo.Multi; - } - } - - /** Properties of a Fee. */ - interface IFee { - /** Fee amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - - /** Fee gasLimit */ - gasLimit?: number | Long | null; - } - - /** Represents a Fee. */ - class Fee implements IFee { - /** - * Constructs a new Fee. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.IFee); - - /** Fee amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** Fee gasLimit. */ - public gasLimit: number | Long; - - /** - * Creates a new Fee instance using the specified properties. - * @param [properties] Properties to set - * @returns Fee instance - */ - public static create(properties?: cosmos_sdk.tx.v1.IFee): cosmos_sdk.tx.v1.Fee; - - /** - * Encodes the specified Fee message. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. - * @param m Fee message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.IFee, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Fee message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Fee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.Fee; - } + /** Properties of a DecCoin. */ + interface IDecCoin { + /** DecCoin denom */ + denom?: string | null; + + /** DecCoin amount */ + amount?: string | null; + } + + /** Represents a DecCoin. */ + class DecCoin implements IDecCoin { + /** + * Constructs a new DecCoin. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IDecCoin); + + /** DecCoin denom. */ + public denom: string; + + /** DecCoin amount. */ + public amount: string; + + /** + * Creates a new DecCoin instance using the specified properties. + * @param [properties] Properties to set + * @returns DecCoin instance + */ + public static create(properties?: cosmos.IDecCoin): cosmos.DecCoin; + + /** + * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.DecCoin.verify|verify} messages. + * @param m DecCoin message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IDecCoin, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.DecCoin; + } + + /** Properties of an IntProto. */ + interface IIntProto { + /** IntProto int */ + int?: string | null; + } + + /** Represents an IntProto. */ + class IntProto implements IIntProto { + /** + * Constructs a new IntProto. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IIntProto); + + /** IntProto int. */ + public int: string; + + /** + * Creates a new IntProto instance using the specified properties. + * @param [properties] Properties to set + * @returns IntProto instance + */ + public static create(properties?: cosmos.IIntProto): cosmos.IntProto; + + /** + * Encodes the specified IntProto message. Does not implicitly {@link cosmos.IntProto.verify|verify} messages. + * @param m IntProto message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IIntProto, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.IntProto; + } + + /** Properties of a DecProto. */ + interface IDecProto { + /** DecProto dec */ + dec?: string | null; + } + + /** Represents a DecProto. */ + class DecProto implements IDecProto { + /** + * Constructs a new DecProto. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IDecProto); + + /** DecProto dec. */ + public dec: string; + + /** + * Creates a new DecProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DecProto instance + */ + public static create(properties?: cosmos.IDecProto): cosmos.DecProto; + + /** + * Encodes the specified DecProto message. Does not implicitly {@link cosmos.DecProto.verify|verify} messages. + * @param m DecProto message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IDecProto, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.DecProto; + } + + /** Properties of a ValAddresses. */ + interface IValAddresses { + /** ValAddresses addresses */ + addresses?: Uint8Array[] | null; + } + + /** Represents a ValAddresses. */ + class ValAddresses implements IValAddresses { + /** + * Constructs a new ValAddresses. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IValAddresses); + + /** ValAddresses addresses. */ + public addresses: Uint8Array[]; + + /** + * Creates a new ValAddresses instance using the specified properties. + * @param [properties] Properties to set + * @returns ValAddresses instance + */ + public static create(properties?: cosmos.IValAddresses): cosmos.ValAddresses; + + /** + * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos.ValAddresses.verify|verify} messages. + * @param m ValAddresses message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IValAddresses, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.ValAddresses; + } + + /** Properties of a GasInfo. */ + interface IGasInfo { + /** GasInfo gasWanted */ + gasWanted?: number | Long | null; + + /** GasInfo gasUsed */ + gasUsed?: number | Long | null; + } + + /** Represents a GasInfo. */ + class GasInfo implements IGasInfo { + /** + * Constructs a new GasInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IGasInfo); + + /** GasInfo gasWanted. */ + public gasWanted: number | Long; + + /** GasInfo gasUsed. */ + public gasUsed: number | Long; + + /** + * Creates a new GasInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GasInfo instance + */ + public static create(properties?: cosmos.IGasInfo): cosmos.GasInfo; + + /** + * Encodes the specified GasInfo message. Does not implicitly {@link cosmos.GasInfo.verify|verify} messages. + * @param m GasInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IGasInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GasInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns GasInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.GasInfo; + } + + /** Properties of a Result. */ + interface IResult { + /** Result data */ + data?: Uint8Array | null; + + /** Result log */ + log?: string | null; + + /** Result events */ + events?: tendermint.abci.types.IEvent[] | null; + } + + /** Represents a Result. */ + class Result implements IResult { + /** + * Constructs a new Result. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IResult); + + /** Result data. */ + public data: Uint8Array; + + /** Result log. */ + public log: string; + + /** Result events. */ + public events: tendermint.abci.types.IEvent[]; + + /** + * Creates a new Result instance using the specified properties. + * @param [properties] Properties to set + * @returns Result instance + */ + public static create(properties?: cosmos.IResult): cosmos.Result; + + /** + * Encodes the specified Result message. Does not implicitly {@link cosmos.Result.verify|verify} messages. + * @param m Result message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IResult, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Result message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.Result; + } + + /** Properties of a SimulationResponse. */ + interface ISimulationResponse { + /** SimulationResponse gasInfo */ + gasInfo?: cosmos.IGasInfo | null; + + /** SimulationResponse result */ + result?: cosmos.IResult | null; + } + + /** Represents a SimulationResponse. */ + class SimulationResponse implements ISimulationResponse { + /** + * Constructs a new SimulationResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.ISimulationResponse); + + /** SimulationResponse gasInfo. */ + public gasInfo?: cosmos.IGasInfo | null; + + /** SimulationResponse result. */ + public result?: cosmos.IResult | null; + + /** + * Creates a new SimulationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulationResponse instance + */ + public static create(properties?: cosmos.ISimulationResponse): cosmos.SimulationResponse; + + /** + * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos.SimulationResponse.verify|verify} messages. + * @param m SimulationResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.ISimulationResponse, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns SimulationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.SimulationResponse; + } + + /** Properties of a MsgData. */ + interface IMsgData { + /** MsgData msgType */ + msgType?: string | null; + + /** MsgData data */ + data?: Uint8Array | null; + } + + /** Represents a MsgData. */ + class MsgData implements IMsgData { + /** + * Constructs a new MsgData. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IMsgData); + + /** MsgData msgType. */ + public msgType: string; + + /** MsgData data. */ + public data: Uint8Array; + + /** + * Creates a new MsgData instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgData instance + */ + public static create(properties?: cosmos.IMsgData): cosmos.MsgData; + + /** + * Encodes the specified MsgData message. Does not implicitly {@link cosmos.MsgData.verify|verify} messages. + * @param m MsgData message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IMsgData, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgData message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.MsgData; + } + + /** Properties of a TxData. */ + interface ITxData { + /** TxData data */ + data?: cosmos.IMsgData[] | null; + } + + /** Represents a TxData. */ + class TxData implements ITxData { + /** + * Constructs a new TxData. + * @param [p] Properties to set + */ + constructor(p?: cosmos.ITxData); + + /** TxData data. */ + public data: cosmos.IMsgData[]; + + /** + * Creates a new TxData instance using the specified properties. + * @param [properties] Properties to set + * @returns TxData instance + */ + public static create(properties?: cosmos.ITxData): cosmos.TxData; + + /** + * Encodes the specified TxData message. Does not implicitly {@link cosmos.TxData.verify|verify} messages. + * @param m TxData message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.ITxData, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TxData message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns TxData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.TxData; + } + + /** Namespace bank. */ + namespace bank { + /** Properties of a Params. */ + interface IParams { + /** Params sendEnabled */ + sendEnabled?: cosmos.bank.ISendEnabled[] | null; + + /** Params defaultSendEnabled */ + defaultSendEnabled?: boolean | null; } - /** Namespace signing. */ - namespace signing { - /** Namespace v1. */ - namespace v1 { - /** SignMode enum. */ - enum SignMode { - SIGN_MODE_UNSPECIFIED = 0, - SIGN_MODE_DIRECT = 1, - SIGN_MODE_TEXTUAL = 2, - SIGN_MODE_LEGACY_AMINO_JSON = 127, - } - } + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IParams); + + /** Params sendEnabled. */ + public sendEnabled: cosmos.bank.ISendEnabled[]; + + /** Params defaultSendEnabled. */ + public defaultSendEnabled: boolean; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos.bank.IParams): cosmos.bank.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.bank.Params.verify|verify} messages. + * @param m Params message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IParams, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.Params; + } + + /** Properties of a SendEnabled. */ + interface ISendEnabled { + /** SendEnabled denom */ + denom?: string | null; + + /** SendEnabled enabled */ + enabled?: boolean | null; + } + + /** Represents a SendEnabled. */ + class SendEnabled implements ISendEnabled { + /** + * Constructs a new SendEnabled. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.ISendEnabled); + + /** SendEnabled denom. */ + public denom: string; + + /** SendEnabled enabled. */ + public enabled: boolean; + + /** + * Creates a new SendEnabled instance using the specified properties. + * @param [properties] Properties to set + * @returns SendEnabled instance + */ + public static create(properties?: cosmos.bank.ISendEnabled): cosmos.bank.SendEnabled; + + /** + * Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.SendEnabled.verify|verify} messages. + * @param m SendEnabled message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.ISendEnabled, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SendEnabled message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns SendEnabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.SendEnabled; + } + + /** Properties of a MsgSend. */ + interface IMsgSend { + /** MsgSend fromAddress */ + fromAddress?: Uint8Array | null; + + /** MsgSend toAddress */ + toAddress?: Uint8Array | null; + + /** MsgSend amount */ + amount?: cosmos.ICoin[] | null; + } + + /** Represents a MsgSend. */ + class MsgSend implements IMsgSend { + /** + * Constructs a new MsgSend. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IMsgSend); + + /** MsgSend fromAddress. */ + public fromAddress: Uint8Array; + + /** MsgSend toAddress. */ + public toAddress: Uint8Array; + + /** MsgSend amount. */ + public amount: cosmos.ICoin[]; + + /** + * Creates a new MsgSend instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSend instance + */ + public static create(properties?: cosmos.bank.IMsgSend): cosmos.bank.MsgSend; + + /** + * Encodes the specified MsgSend message. Does not implicitly {@link cosmos.bank.MsgSend.verify|verify} messages. + * @param m MsgSend message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IMsgSend, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.MsgSend; + } + + /** Properties of an Input. */ + interface IInput { + /** Input address */ + address?: Uint8Array | null; + + /** Input coins */ + coins?: cosmos.ICoin[] | null; + } + + /** Represents an Input. */ + class Input implements IInput { + /** + * Constructs a new Input. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IInput); + + /** Input address. */ + public address: Uint8Array; + + /** Input coins. */ + public coins: cosmos.ICoin[]; + + /** + * Creates a new Input instance using the specified properties. + * @param [properties] Properties to set + * @returns Input instance + */ + public static create(properties?: cosmos.bank.IInput): cosmos.bank.Input; + + /** + * Encodes the specified Input message. Does not implicitly {@link cosmos.bank.Input.verify|verify} messages. + * @param m Input message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IInput, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Input message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.Input; + } + + /** Properties of an Output. */ + interface IOutput { + /** Output address */ + address?: Uint8Array | null; + + /** Output coins */ + coins?: cosmos.ICoin[] | null; + } + + /** Represents an Output. */ + class Output implements IOutput { + /** + * Constructs a new Output. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IOutput); + + /** Output address. */ + public address: Uint8Array; + + /** Output coins. */ + public coins: cosmos.ICoin[]; + + /** + * Creates a new Output instance using the specified properties. + * @param [properties] Properties to set + * @returns Output instance + */ + public static create(properties?: cosmos.bank.IOutput): cosmos.bank.Output; + + /** + * Encodes the specified Output message. Does not implicitly {@link cosmos.bank.Output.verify|verify} messages. + * @param m Output message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IOutput, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Output message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.Output; + } + + /** Properties of a MsgMultiSend. */ + interface IMsgMultiSend { + /** MsgMultiSend inputs */ + inputs?: cosmos.bank.IInput[] | null; + + /** MsgMultiSend outputs */ + outputs?: cosmos.bank.IOutput[] | null; + } + + /** Represents a MsgMultiSend. */ + class MsgMultiSend implements IMsgMultiSend { + /** + * Constructs a new MsgMultiSend. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IMsgMultiSend); + + /** MsgMultiSend inputs. */ + public inputs: cosmos.bank.IInput[]; + + /** MsgMultiSend outputs. */ + public outputs: cosmos.bank.IOutput[]; + + /** + * Creates a new MsgMultiSend instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgMultiSend instance + */ + public static create(properties?: cosmos.bank.IMsgMultiSend): cosmos.bank.MsgMultiSend; + + /** + * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos.bank.MsgMultiSend.verify|verify} messages. + * @param m MsgMultiSend message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IMsgMultiSend, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.MsgMultiSend; + } + + /** Properties of a Supply. */ + interface ISupply { + /** Supply total */ + total?: cosmos.ICoin[] | null; + } + + /** Represents a Supply. */ + class Supply implements ISupply { + /** + * Constructs a new Supply. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.ISupply); + + /** Supply total. */ + public total: cosmos.ICoin[]; + + /** + * Creates a new Supply instance using the specified properties. + * @param [properties] Properties to set + * @returns Supply instance + */ + public static create(properties?: cosmos.bank.ISupply): cosmos.bank.Supply; + + /** + * Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.Supply.verify|verify} messages. + * @param m Supply message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.ISupply, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.Supply; } } /** Namespace crypto. */ namespace crypto { - /** Namespace v1. */ - namespace v1 { - /** Properties of a PublicKey. */ - interface IPublicKey { - /** PublicKey secp256k1 */ - secp256k1?: Uint8Array | null; + /** Properties of a PublicKey. */ + interface IPublicKey { + /** PublicKey secp256k1 */ + secp256k1?: Uint8Array | null; - /** PublicKey ed25519 */ - ed25519?: Uint8Array | null; + /** PublicKey ed25519 */ + ed25519?: Uint8Array | null; - /** PublicKey sr25519 */ - sr25519?: Uint8Array | null; + /** PublicKey sr25519 */ + sr25519?: Uint8Array | null; - /** PublicKey multisig */ - multisig?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold | null; + /** PublicKey multisig */ + multisig?: cosmos.crypto.IPubKeyMultisigThreshold | null; - /** PublicKey secp256r1 */ - secp256r1?: Uint8Array | null; + /** PublicKey secp256r1 */ + secp256r1?: Uint8Array | null; - /** PublicKey anyPubkey */ - anyPubkey?: google.protobuf.IAny | null; + /** PublicKey anyPubkey */ + anyPubkey?: google.protobuf.IAny | null; + } + + /** Represents a PublicKey. */ + class PublicKey implements IPublicKey { + /** + * Constructs a new PublicKey. + * @param [p] Properties to set + */ + constructor(p?: cosmos.crypto.IPublicKey); + + /** PublicKey secp256k1. */ + public secp256k1: Uint8Array; + + /** PublicKey ed25519. */ + public ed25519: Uint8Array; + + /** PublicKey sr25519. */ + public sr25519: Uint8Array; + + /** PublicKey multisig. */ + public multisig?: cosmos.crypto.IPubKeyMultisigThreshold | null; + + /** PublicKey secp256r1. */ + public secp256r1: Uint8Array; + + /** PublicKey anyPubkey. */ + public anyPubkey?: google.protobuf.IAny | null; + + /** PublicKey sum. */ + public sum?: "secp256k1" | "ed25519" | "sr25519" | "multisig" | "secp256r1" | "anyPubkey"; + + /** + * Creates a new PublicKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKey instance + */ + public static create(properties?: cosmos.crypto.IPublicKey): cosmos.crypto.PublicKey; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link cosmos.crypto.PublicKey.verify|verify} messages. + * @param m PublicKey message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.crypto.IPublicKey, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.crypto.PublicKey; + } + + /** Properties of a PubKeyMultisigThreshold. */ + interface IPubKeyMultisigThreshold { + /** PubKeyMultisigThreshold threshold */ + threshold?: number | null; + + /** PubKeyMultisigThreshold publicKeys */ + publicKeys?: cosmos.crypto.IPublicKey[] | null; + } + + /** Represents a PubKeyMultisigThreshold. */ + class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** + * Constructs a new PubKeyMultisigThreshold. + * @param [p] Properties to set + */ + constructor(p?: cosmos.crypto.IPubKeyMultisigThreshold); + + /** PubKeyMultisigThreshold threshold. */ + public threshold: number; + + /** PubKeyMultisigThreshold publicKeys. */ + public publicKeys: cosmos.crypto.IPublicKey[]; + + /** + * Creates a new PubKeyMultisigThreshold instance using the specified properties. + * @param [properties] Properties to set + * @returns PubKeyMultisigThreshold instance + */ + public static create( + properties?: cosmos.crypto.IPubKeyMultisigThreshold, + ): cosmos.crypto.PubKeyMultisigThreshold; + + /** + * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos.crypto.PubKeyMultisigThreshold.verify|verify} messages. + * @param m PubKeyMultisigThreshold message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.crypto.IPubKeyMultisigThreshold, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns PubKeyMultisigThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.crypto.PubKeyMultisigThreshold; + } + + /** Properties of a MultiSignature. */ + interface IMultiSignature { + /** MultiSignature signatures */ + signatures?: Uint8Array[] | null; + } + + /** Represents a MultiSignature. */ + class MultiSignature implements IMultiSignature { + /** + * Constructs a new MultiSignature. + * @param [p] Properties to set + */ + constructor(p?: cosmos.crypto.IMultiSignature); + + /** MultiSignature signatures. */ + public signatures: Uint8Array[]; + + /** + * Creates a new MultiSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns MultiSignature instance + */ + public static create(properties?: cosmos.crypto.IMultiSignature): cosmos.crypto.MultiSignature; + + /** + * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos.crypto.MultiSignature.verify|verify} messages. + * @param m MultiSignature message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.crypto.IMultiSignature, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.crypto.MultiSignature; + } + + /** Properties of a CompactBitArray. */ + interface ICompactBitArray { + /** CompactBitArray extraBitsStored */ + extraBitsStored?: number | null; + + /** CompactBitArray elems */ + elems?: Uint8Array | null; + } + + /** Represents a CompactBitArray. */ + class CompactBitArray implements ICompactBitArray { + /** + * Constructs a new CompactBitArray. + * @param [p] Properties to set + */ + constructor(p?: cosmos.crypto.ICompactBitArray); + + /** CompactBitArray extraBitsStored. */ + public extraBitsStored: number; + + /** CompactBitArray elems. */ + public elems: Uint8Array; + + /** + * Creates a new CompactBitArray instance using the specified properties. + * @param [properties] Properties to set + * @returns CompactBitArray instance + */ + public static create(properties?: cosmos.crypto.ICompactBitArray): cosmos.crypto.CompactBitArray; + + /** + * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos.crypto.CompactBitArray.verify|verify} messages. + * @param m CompactBitArray message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.crypto.ICompactBitArray, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.crypto.CompactBitArray; + } + } + + /** Namespace tx. */ + namespace tx { + /** Properties of a Tx. */ + interface ITx { + /** Tx body */ + body?: cosmos.tx.ITxBody | null; + + /** Tx authInfo */ + authInfo?: cosmos.tx.IAuthInfo | null; + + /** Tx signatures */ + signatures?: Uint8Array[] | null; + } + + /** Represents a Tx. */ + class Tx implements ITx { + /** + * Constructs a new Tx. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ITx); + + /** Tx body. */ + public body?: cosmos.tx.ITxBody | null; + + /** Tx authInfo. */ + public authInfo?: cosmos.tx.IAuthInfo | null; + + /** Tx signatures. */ + public signatures: Uint8Array[]; + + /** + * Creates a new Tx instance using the specified properties. + * @param [properties] Properties to set + * @returns Tx instance + */ + public static create(properties?: cosmos.tx.ITx): cosmos.tx.Tx; + + /** + * Encodes the specified Tx message. Does not implicitly {@link cosmos.tx.Tx.verify|verify} messages. + * @param m Tx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ITx, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.Tx; + } + + /** Properties of a TxRaw. */ + interface ITxRaw { + /** TxRaw bodyBytes */ + bodyBytes?: Uint8Array | null; + + /** TxRaw authInfoBytes */ + authInfoBytes?: Uint8Array | null; + + /** TxRaw signatures */ + signatures?: Uint8Array[] | null; + } + + /** Represents a TxRaw. */ + class TxRaw implements ITxRaw { + /** + * Constructs a new TxRaw. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ITxRaw); + + /** TxRaw bodyBytes. */ + public bodyBytes: Uint8Array; + + /** TxRaw authInfoBytes. */ + public authInfoBytes: Uint8Array; + + /** TxRaw signatures. */ + public signatures: Uint8Array[]; + + /** + * Creates a new TxRaw instance using the specified properties. + * @param [properties] Properties to set + * @returns TxRaw instance + */ + public static create(properties?: cosmos.tx.ITxRaw): cosmos.tx.TxRaw; + + /** + * Encodes the specified TxRaw message. Does not implicitly {@link cosmos.tx.TxRaw.verify|verify} messages. + * @param m TxRaw message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ITxRaw, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TxRaw message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns TxRaw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.TxRaw; + } + + /** Properties of a SignDoc. */ + interface ISignDoc { + /** SignDoc bodyBytes */ + bodyBytes?: Uint8Array | null; + + /** SignDoc authInfoBytes */ + authInfoBytes?: Uint8Array | null; + + /** SignDoc chainId */ + chainId?: string | null; + + /** SignDoc accountNumber */ + accountNumber?: number | Long | null; + + /** SignDoc accountSequence */ + accountSequence?: number | Long | null; + } + + /** Represents a SignDoc. */ + class SignDoc implements ISignDoc { + /** + * Constructs a new SignDoc. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ISignDoc); + + /** SignDoc bodyBytes. */ + public bodyBytes: Uint8Array; + + /** SignDoc authInfoBytes. */ + public authInfoBytes: Uint8Array; + + /** SignDoc chainId. */ + public chainId: string; + + /** SignDoc accountNumber. */ + public accountNumber: number | Long; + + /** SignDoc accountSequence. */ + public accountSequence: number | Long; + + /** + * Creates a new SignDoc instance using the specified properties. + * @param [properties] Properties to set + * @returns SignDoc instance + */ + public static create(properties?: cosmos.tx.ISignDoc): cosmos.tx.SignDoc; + + /** + * Encodes the specified SignDoc message. Does not implicitly {@link cosmos.tx.SignDoc.verify|verify} messages. + * @param m SignDoc message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ISignDoc, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SignDoc message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.SignDoc; + } + + /** Properties of a TxBody. */ + interface ITxBody { + /** TxBody messages */ + messages?: google.protobuf.IAny[] | null; + + /** TxBody memo */ + memo?: string | null; + + /** TxBody timeoutHeight */ + timeoutHeight?: number | Long | null; + + /** TxBody extensionOptions */ + extensionOptions?: google.protobuf.IAny[] | null; + + /** TxBody nonCriticalExtensionOptions */ + nonCriticalExtensionOptions?: google.protobuf.IAny[] | null; + } + + /** Represents a TxBody. */ + class TxBody implements ITxBody { + /** + * Constructs a new TxBody. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ITxBody); + + /** TxBody messages. */ + public messages: google.protobuf.IAny[]; + + /** TxBody memo. */ + public memo: string; + + /** TxBody timeoutHeight. */ + public timeoutHeight: number | Long; + + /** TxBody extensionOptions. */ + public extensionOptions: google.protobuf.IAny[]; + + /** TxBody nonCriticalExtensionOptions. */ + public nonCriticalExtensionOptions: google.protobuf.IAny[]; + + /** + * Creates a new TxBody instance using the specified properties. + * @param [properties] Properties to set + * @returns TxBody instance + */ + public static create(properties?: cosmos.tx.ITxBody): cosmos.tx.TxBody; + + /** + * Encodes the specified TxBody message. Does not implicitly {@link cosmos.tx.TxBody.verify|verify} messages. + * @param m TxBody message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ITxBody, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TxBody message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.TxBody; + } + + /** Properties of an AuthInfo. */ + interface IAuthInfo { + /** AuthInfo signerInfos */ + signerInfos?: cosmos.tx.ISignerInfo[] | null; + + /** AuthInfo fee */ + fee?: cosmos.tx.IFee | null; + } + + /** Represents an AuthInfo. */ + class AuthInfo implements IAuthInfo { + /** + * Constructs a new AuthInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.IAuthInfo); + + /** AuthInfo signerInfos. */ + public signerInfos: cosmos.tx.ISignerInfo[]; + + /** AuthInfo fee. */ + public fee?: cosmos.tx.IFee | null; + + /** + * Creates a new AuthInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthInfo instance + */ + public static create(properties?: cosmos.tx.IAuthInfo): cosmos.tx.AuthInfo; + + /** + * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos.tx.AuthInfo.verify|verify} messages. + * @param m AuthInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.IAuthInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.AuthInfo; + } + + /** Properties of a SignerInfo. */ + interface ISignerInfo { + /** SignerInfo publicKey */ + publicKey?: cosmos.crypto.IPublicKey | null; + + /** SignerInfo modeInfo */ + modeInfo?: cosmos.tx.IModeInfo | null; + } + + /** Represents a SignerInfo. */ + class SignerInfo implements ISignerInfo { + /** + * Constructs a new SignerInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ISignerInfo); + + /** SignerInfo publicKey. */ + public publicKey?: cosmos.crypto.IPublicKey | null; + + /** SignerInfo modeInfo. */ + public modeInfo?: cosmos.tx.IModeInfo | null; + + /** + * Creates a new SignerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SignerInfo instance + */ + public static create(properties?: cosmos.tx.ISignerInfo): cosmos.tx.SignerInfo; + + /** + * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos.tx.SignerInfo.verify|verify} messages. + * @param m SignerInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ISignerInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SignerInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.SignerInfo; + } + + /** Properties of a ModeInfo. */ + interface IModeInfo { + /** ModeInfo single */ + single?: cosmos.tx.ModeInfo.ISingle | null; + + /** ModeInfo multi */ + multi?: cosmos.tx.ModeInfo.IMulti | null; + } + + /** Represents a ModeInfo. */ + class ModeInfo implements IModeInfo { + /** + * Constructs a new ModeInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.IModeInfo); + + /** ModeInfo single. */ + public single?: cosmos.tx.ModeInfo.ISingle | null; + + /** ModeInfo multi. */ + public multi?: cosmos.tx.ModeInfo.IMulti | null; + + /** ModeInfo sum. */ + public sum?: "single" | "multi"; + + /** + * Creates a new ModeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ModeInfo instance + */ + public static create(properties?: cosmos.tx.IModeInfo): cosmos.tx.ModeInfo; + + /** + * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos.tx.ModeInfo.verify|verify} messages. + * @param m ModeInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.IModeInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModeInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.ModeInfo; + } + + namespace ModeInfo { + /** Properties of a Single. */ + interface ISingle { + /** Single mode */ + mode?: cosmos.tx.signing.SignMode | null; } - /** Represents a PublicKey. */ - class PublicKey implements IPublicKey { + /** Represents a Single. */ + class Single implements ISingle { /** - * Constructs a new PublicKey. + * Constructs a new Single. * @param [p] Properties to set */ - constructor(p?: cosmos_sdk.crypto.v1.IPublicKey); + constructor(p?: cosmos.tx.ModeInfo.ISingle); - /** PublicKey secp256k1. */ - public secp256k1: Uint8Array; - - /** PublicKey ed25519. */ - public ed25519: Uint8Array; - - /** PublicKey sr25519. */ - public sr25519: Uint8Array; - - /** PublicKey multisig. */ - public multisig?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold | null; - - /** PublicKey secp256r1. */ - public secp256r1: Uint8Array; - - /** PublicKey anyPubkey. */ - public anyPubkey?: google.protobuf.IAny | null; - - /** PublicKey sum. */ - public sum?: "secp256k1" | "ed25519" | "sr25519" | "multisig" | "secp256r1" | "anyPubkey"; + /** Single mode. */ + public mode: cosmos.tx.signing.SignMode; /** - * Creates a new PublicKey instance using the specified properties. + * Creates a new Single instance using the specified properties. * @param [properties] Properties to set - * @returns PublicKey instance + * @returns Single instance */ - public static create(properties?: cosmos_sdk.crypto.v1.IPublicKey): cosmos_sdk.crypto.v1.PublicKey; + public static create(properties?: cosmos.tx.ModeInfo.ISingle): cosmos.tx.ModeInfo.Single; /** - * Encodes the specified PublicKey message. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @param m PublicKey message or plain object to encode + * Encodes the specified Single message. Does not implicitly {@link cosmos.tx.ModeInfo.Single.verify|verify} messages. + * @param m Single message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: cosmos_sdk.crypto.v1.IPublicKey, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos.tx.ModeInfo.ISingle, w?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PublicKey message from the specified reader or buffer. + * Decodes a Single message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns PublicKey + * @returns Single * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.crypto.v1.PublicKey; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.ModeInfo.Single; } - /** Properties of a PubKeyMultisigThreshold. */ - interface IPubKeyMultisigThreshold { - /** PubKeyMultisigThreshold threshold */ - threshold?: number | null; + /** Properties of a Multi. */ + interface IMulti { + /** Multi bitarray */ + bitarray?: cosmos.crypto.ICompactBitArray | null; - /** PubKeyMultisigThreshold publicKeys */ - publicKeys?: cosmos_sdk.crypto.v1.IPublicKey[] | null; + /** Multi modeInfos */ + modeInfos?: cosmos.tx.IModeInfo[] | null; } - /** Represents a PubKeyMultisigThreshold. */ - class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** Represents a Multi. */ + class Multi implements IMulti { /** - * Constructs a new PubKeyMultisigThreshold. + * Constructs a new Multi. * @param [p] Properties to set */ - constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + constructor(p?: cosmos.tx.ModeInfo.IMulti); - /** PubKeyMultisigThreshold threshold. */ - public threshold: number; + /** Multi bitarray. */ + public bitarray?: cosmos.crypto.ICompactBitArray | null; - /** PubKeyMultisigThreshold publicKeys. */ - public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; + /** Multi modeInfos. */ + public modeInfos: cosmos.tx.IModeInfo[]; /** - * Creates a new PubKeyMultisigThreshold instance using the specified properties. + * Creates a new Multi instance using the specified properties. * @param [properties] Properties to set - * @returns PubKeyMultisigThreshold instance + * @returns Multi instance */ - public static create( - properties?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, - ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + public static create(properties?: cosmos.tx.ModeInfo.IMulti): cosmos.tx.ModeInfo.Multi; /** - * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @param m PubKeyMultisigThreshold message or plain object to encode + * Encodes the specified Multi message. Does not implicitly {@link cosmos.tx.ModeInfo.Multi.verify|verify} messages. + * @param m Multi message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode( - m: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, - w?: $protobuf.Writer, - ): $protobuf.Writer; + public static encode(m: cosmos.tx.ModeInfo.IMulti, w?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. + * Decodes a Multi message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns PubKeyMultisigThreshold + * @returns Multi * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.ModeInfo.Multi; } + } - /** Properties of a MultiSignature. */ - interface IMultiSignature { - /** MultiSignature signatures */ - signatures?: Uint8Array[] | null; - } + /** Properties of a Fee. */ + interface IFee { + /** Fee amount */ + amount?: cosmos.ICoin[] | null; - /** Represents a MultiSignature. */ - class MultiSignature implements IMultiSignature { - /** - * Constructs a new MultiSignature. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.IMultiSignature); + /** Fee gasLimit */ + gasLimit?: number | Long | null; + } - /** MultiSignature signatures. */ - public signatures: Uint8Array[]; + /** Represents a Fee. */ + class Fee implements IFee { + /** + * Constructs a new Fee. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.IFee); - /** - * Creates a new MultiSignature instance using the specified properties. - * @param [properties] Properties to set - * @returns MultiSignature instance - */ - public static create( - properties?: cosmos_sdk.crypto.v1.IMultiSignature, - ): cosmos_sdk.crypto.v1.MultiSignature; + /** Fee amount. */ + public amount: cosmos.ICoin[]; - /** - * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @param m MultiSignature message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.crypto.v1.IMultiSignature, w?: $protobuf.Writer): $protobuf.Writer; + /** Fee gasLimit. */ + public gasLimit: number | Long; - /** - * Decodes a MultiSignature message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MultiSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.crypto.v1.MultiSignature; - } + /** + * Creates a new Fee instance using the specified properties. + * @param [properties] Properties to set + * @returns Fee instance + */ + public static create(properties?: cosmos.tx.IFee): cosmos.tx.Fee; - /** Properties of a CompactBitArray. */ - interface ICompactBitArray { - /** CompactBitArray extraBitsStored */ - extraBitsStored?: number | null; + /** + * Encodes the specified Fee message. Does not implicitly {@link cosmos.tx.Fee.verify|verify} messages. + * @param m Fee message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.IFee, w?: $protobuf.Writer): $protobuf.Writer; - /** CompactBitArray elems */ - elems?: Uint8Array | null; - } + /** + * Decodes a Fee message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.Fee; + } - /** Represents a CompactBitArray. */ - class CompactBitArray implements ICompactBitArray { - /** - * Constructs a new CompactBitArray. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.ICompactBitArray); - - /** CompactBitArray extraBitsStored. */ - public extraBitsStored: number; - - /** CompactBitArray elems. */ - public elems: Uint8Array; - - /** - * Creates a new CompactBitArray instance using the specified properties. - * @param [properties] Properties to set - * @returns CompactBitArray instance - */ - public static create( - properties?: cosmos_sdk.crypto.v1.ICompactBitArray, - ): cosmos_sdk.crypto.v1.CompactBitArray; - - /** - * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @param m CompactBitArray message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: cosmos_sdk.crypto.v1.ICompactBitArray, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CompactBitArray message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns CompactBitArray - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.crypto.v1.CompactBitArray; + /** Namespace signing. */ + namespace signing { + /** SignMode enum. */ + enum SignMode { + SIGN_MODE_UNSPECIFIED = 0, + SIGN_MODE_DIRECT = 1, + SIGN_MODE_TEXTUAL = 2, + SIGN_MODE_LEGACY_AMINO_JSON = 127, } } } diff --git a/packages/proto-signing/src/generated/codecimpl.js b/packages/proto-signing/src/generated/codecimpl.js index 97f9943f9d..f454a887f9 100644 --- a/packages/proto-signing/src/generated/codecimpl.js +++ b/packages/proto-signing/src/generated/codecimpl.js @@ -1,273 +1,462 @@ "use strict"; +exports.__esModule = true; +exports.google = exports.tendermint = exports.cosmos = void 0; var $protobuf = require("protobufjs/minimal"); var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); -$root.cosmos_sdk = (function () { - var cosmos_sdk = {}; - cosmos_sdk.x = (function () { - var x = {}; - x.bank = (function () { - var bank = {}; - bank.v1 = (function () { - var v1 = {}; - v1.MsgSend = (function () { - function MsgSend(p) { - this.amount = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgSend.prototype.fromAddress = $util.newBuffer([]); - MsgSend.prototype.toAddress = $util.newBuffer([]); - MsgSend.prototype.amount = $util.emptyArray; - MsgSend.create = function create(properties) { - return new MsgSend(properties); - }; - MsgSend.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.fromAddress != null && Object.hasOwnProperty.call(m, "fromAddress")) - w.uint32(10).bytes(m.fromAddress); - if (m.toAddress != null && Object.hasOwnProperty.call(m, "toAddress")) - w.uint32(18).bytes(m.toAddress); - if (m.amount != null && m.amount.length) { - for (var i = 0; i < m.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.amount[i], w.uint32(26).fork()).ldelim(); - } - return w; - }; - MsgSend.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.x.bank.v1.MsgSend(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.fromAddress = r.bytes(); - break; - case 2: - m.toAddress = r.bytes(); - break; - case 3: - if (!(m.amount && m.amount.length)) m.amount = []; - m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgSend; - })(); - v1.Input = (function () { - function Input(p) { - this.coins = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - Input.prototype.address = $util.newBuffer([]); - Input.prototype.coins = $util.emptyArray; - Input.create = function create(properties) { - return new Input(properties); - }; - Input.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.address != null && Object.hasOwnProperty.call(m, "address")) w.uint32(10).bytes(m.address); - if (m.coins != null && m.coins.length) { - for (var i = 0; i < m.coins.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.coins[i], w.uint32(18).fork()).ldelim(); - } - return w; - }; - Input.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.x.bank.v1.Input(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.bytes(); - break; - case 2: - if (!(m.coins && m.coins.length)) m.coins = []; - m.coins.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return Input; - })(); - v1.Output = (function () { - function Output(p) { - this.coins = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - Output.prototype.address = $util.newBuffer([]); - Output.prototype.coins = $util.emptyArray; - Output.create = function create(properties) { - return new Output(properties); - }; - Output.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.address != null && Object.hasOwnProperty.call(m, "address")) w.uint32(10).bytes(m.address); - if (m.coins != null && m.coins.length) { - for (var i = 0; i < m.coins.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.coins[i], w.uint32(18).fork()).ldelim(); - } - return w; - }; - Output.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.x.bank.v1.Output(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.bytes(); - break; - case 2: - if (!(m.coins && m.coins.length)) m.coins = []; - m.coins.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return Output; - })(); - v1.MsgMultiSend = (function () { - function MsgMultiSend(p) { - this.inputs = []; - this.outputs = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MsgMultiSend.prototype.inputs = $util.emptyArray; - MsgMultiSend.prototype.outputs = $util.emptyArray; - MsgMultiSend.create = function create(properties) { - return new MsgMultiSend(properties); - }; - MsgMultiSend.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.inputs != null && m.inputs.length) { - for (var i = 0; i < m.inputs.length; ++i) - $root.cosmos_sdk.x.bank.v1.Input.encode(m.inputs[i], w.uint32(10).fork()).ldelim(); - } - if (m.outputs != null && m.outputs.length) { - for (var i = 0; i < m.outputs.length; ++i) - $root.cosmos_sdk.x.bank.v1.Output.encode(m.outputs[i], w.uint32(18).fork()).ldelim(); - } - return w; - }; - MsgMultiSend.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.x.bank.v1.MsgMultiSend(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.inputs && m.inputs.length)) m.inputs = []; - m.inputs.push($root.cosmos_sdk.x.bank.v1.Input.decode(r, r.uint32())); - break; - case 2: - if (!(m.outputs && m.outputs.length)) m.outputs = []; - m.outputs.push($root.cosmos_sdk.x.bank.v1.Output.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MsgMultiSend; - })(); - v1.Supply = (function () { - function Supply(p) { - this.total = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - Supply.prototype.total = $util.emptyArray; - Supply.create = function create(properties) { - return new Supply(properties); - }; - Supply.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.total != null && m.total.length) { - for (var i = 0; i < m.total.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.total[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - Supply.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.x.bank.v1.Supply(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.total && m.total.length)) m.total = []; - m.total.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return Supply; - })(); - return v1; - })(); - return bank; - })(); - return x; +exports.cosmos = $root.cosmos = (function () { + var cosmos = {}; + cosmos.Coin = (function () { + function Coin(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Coin.prototype.denom = ""; + Coin.prototype.amount = ""; + Coin.create = function create(properties) { + return new Coin(properties); + }; + Coin.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.denom != null && Object.hasOwnProperty.call(m, "denom")) w.uint32(10).string(m.denom); + if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) w.uint32(18).string(m.amount); + return w; + }; + Coin.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.Coin(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.denom = r.string(); + break; + case 2: + m.amount = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Coin; })(); - cosmos_sdk.v1 = (function () { - var v1 = {}; - v1.Coin = (function () { - function Coin(p) { + cosmos.DecCoin = (function () { + function DecCoin(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + DecCoin.prototype.denom = ""; + DecCoin.prototype.amount = ""; + DecCoin.create = function create(properties) { + return new DecCoin(properties); + }; + DecCoin.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.denom != null && Object.hasOwnProperty.call(m, "denom")) w.uint32(10).string(m.denom); + if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) w.uint32(18).string(m.amount); + return w; + }; + DecCoin.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.DecCoin(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.denom = r.string(); + break; + case 2: + m.amount = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return DecCoin; + })(); + cosmos.IntProto = (function () { + function IntProto(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + IntProto.prototype.int = ""; + IntProto.create = function create(properties) { + return new IntProto(properties); + }; + IntProto.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.int != null && Object.hasOwnProperty.call(m, "int")) w.uint32(10).string(m.int); + return w; + }; + IntProto.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.IntProto(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.int = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return IntProto; + })(); + cosmos.DecProto = (function () { + function DecProto(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + DecProto.prototype.dec = ""; + DecProto.create = function create(properties) { + return new DecProto(properties); + }; + DecProto.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.dec != null && Object.hasOwnProperty.call(m, "dec")) w.uint32(10).string(m.dec); + return w; + }; + DecProto.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.DecProto(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.dec = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return DecProto; + })(); + cosmos.ValAddresses = (function () { + function ValAddresses(p) { + this.addresses = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ValAddresses.prototype.addresses = $util.emptyArray; + ValAddresses.create = function create(properties) { + return new ValAddresses(properties); + }; + ValAddresses.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.addresses != null && m.addresses.length) { + for (var i = 0; i < m.addresses.length; ++i) w.uint32(10).bytes(m.addresses[i]); + } + return w; + }; + ValAddresses.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.ValAddresses(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.addresses && m.addresses.length)) m.addresses = []; + m.addresses.push(r.bytes()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValAddresses; + })(); + cosmos.GasInfo = (function () { + function GasInfo(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + GasInfo.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + GasInfo.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + GasInfo.create = function create(properties) { + return new GasInfo(properties); + }; + GasInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.gasWanted != null && Object.hasOwnProperty.call(m, "gasWanted")) w.uint32(8).uint64(m.gasWanted); + if (m.gasUsed != null && Object.hasOwnProperty.call(m, "gasUsed")) w.uint32(16).uint64(m.gasUsed); + return w; + }; + GasInfo.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.GasInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.gasWanted = r.uint64(); + break; + case 2: + m.gasUsed = r.uint64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return GasInfo; + })(); + cosmos.Result = (function () { + function Result(p) { + this.events = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Result.prototype.data = $util.newBuffer([]); + Result.prototype.log = ""; + Result.prototype.events = $util.emptyArray; + Result.create = function create(properties) { + return new Result(properties); + }; + Result.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(10).bytes(m.data); + if (m.log != null && Object.hasOwnProperty.call(m, "log")) w.uint32(18).string(m.log); + if (m.events != null && m.events.length) { + for (var i = 0; i < m.events.length; ++i) + $root.tendermint.abci.types.Event.encode(m.events[i], w.uint32(26).fork()).ldelim(); + } + return w; + }; + Result.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.Result(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.data = r.bytes(); + break; + case 2: + m.log = r.string(); + break; + case 3: + if (!(m.events && m.events.length)) m.events = []; + m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Result; + })(); + cosmos.SimulationResponse = (function () { + function SimulationResponse(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + SimulationResponse.prototype.gasInfo = null; + SimulationResponse.prototype.result = null; + SimulationResponse.create = function create(properties) { + return new SimulationResponse(properties); + }; + SimulationResponse.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.gasInfo != null && Object.hasOwnProperty.call(m, "gasInfo")) + $root.cosmos.GasInfo.encode(m.gasInfo, w.uint32(10).fork()).ldelim(); + if (m.result != null && Object.hasOwnProperty.call(m, "result")) + $root.cosmos.Result.encode(m.result, w.uint32(18).fork()).ldelim(); + return w; + }; + SimulationResponse.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.SimulationResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.gasInfo = $root.cosmos.GasInfo.decode(r, r.uint32()); + break; + case 2: + m.result = $root.cosmos.Result.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return SimulationResponse; + })(); + cosmos.MsgData = (function () { + function MsgData(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MsgData.prototype.msgType = ""; + MsgData.prototype.data = $util.newBuffer([]); + MsgData.create = function create(properties) { + return new MsgData(properties); + }; + MsgData.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.msgType != null && Object.hasOwnProperty.call(m, "msgType")) w.uint32(10).string(m.msgType); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(18).bytes(m.data); + return w; + }; + MsgData.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.MsgData(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.msgType = r.string(); + break; + case 2: + m.data = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MsgData; + })(); + cosmos.TxData = (function () { + function TxData(p) { + this.data = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + TxData.prototype.data = $util.emptyArray; + TxData.create = function create(properties) { + return new TxData(properties); + }; + TxData.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.data != null && m.data.length) { + for (var i = 0; i < m.data.length; ++i) + $root.cosmos.MsgData.encode(m.data[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + TxData.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.TxData(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.data && m.data.length)) m.data = []; + m.data.push($root.cosmos.MsgData.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return TxData; + })(); + cosmos.bank = (function () { + var bank = {}; + bank.Params = (function () { + function Params(p) { + this.sendEnabled = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - Coin.prototype.denom = ""; - Coin.prototype.amount = ""; - Coin.create = function create(properties) { - return new Coin(properties); + Params.prototype.sendEnabled = $util.emptyArray; + Params.prototype.defaultSendEnabled = false; + Params.create = function create(properties) { + return new Params(properties); }; - Coin.encode = function encode(m, w) { + Params.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.denom != null && Object.hasOwnProperty.call(m, "denom")) w.uint32(10).string(m.denom); - if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) w.uint32(18).string(m.amount); + if (m.sendEnabled != null && m.sendEnabled.length) { + for (var i = 0; i < m.sendEnabled.length; ++i) + $root.cosmos.bank.SendEnabled.encode(m.sendEnabled[i], w.uint32(10).fork()).ldelim(); + } + if (m.defaultSendEnabled != null && Object.hasOwnProperty.call(m, "defaultSendEnabled")) + w.uint32(16).bool(m.defaultSendEnabled); return w; }; - Coin.decode = function decode(r, l) { + Params.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.Coin(); + m = new $root.cosmos.bank.Params(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.sendEnabled && m.sendEnabled.length)) m.sendEnabled = []; + m.sendEnabled.push($root.cosmos.bank.SendEnabled.decode(r, r.uint32())); + break; + case 2: + m.defaultSendEnabled = r.bool(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Params; + })(); + bank.SendEnabled = (function () { + function SendEnabled(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + SendEnabled.prototype.denom = ""; + SendEnabled.prototype.enabled = false; + SendEnabled.create = function create(properties) { + return new SendEnabled(properties); + }; + SendEnabled.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.denom != null && Object.hasOwnProperty.call(m, "denom")) w.uint32(10).string(m.denom); + if (m.enabled != null && Object.hasOwnProperty.call(m, "enabled")) w.uint32(16).bool(m.enabled); + return w; + }; + SendEnabled.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.bank.SendEnabled(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { @@ -275,7 +464,7 @@ $root.cosmos_sdk = (function () { m.denom = r.string(); break; case 2: - m.amount = r.string(); + m.enabled = r.bool(); break; default: r.skipType(t & 7); @@ -284,232 +473,49 @@ $root.cosmos_sdk = (function () { } return m; }; - return Coin; + return SendEnabled; })(); - v1.DecCoin = (function () { - function DecCoin(p) { + bank.MsgSend = (function () { + function MsgSend(p) { + this.amount = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - DecCoin.prototype.denom = ""; - DecCoin.prototype.amount = ""; - DecCoin.create = function create(properties) { - return new DecCoin(properties); + MsgSend.prototype.fromAddress = $util.newBuffer([]); + MsgSend.prototype.toAddress = $util.newBuffer([]); + MsgSend.prototype.amount = $util.emptyArray; + MsgSend.create = function create(properties) { + return new MsgSend(properties); }; - DecCoin.encode = function encode(m, w) { + MsgSend.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.denom != null && Object.hasOwnProperty.call(m, "denom")) w.uint32(10).string(m.denom); - if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) w.uint32(18).string(m.amount); + if (m.fromAddress != null && Object.hasOwnProperty.call(m, "fromAddress")) + w.uint32(10).bytes(m.fromAddress); + if (m.toAddress != null && Object.hasOwnProperty.call(m, "toAddress")) + w.uint32(18).bytes(m.toAddress); + if (m.amount != null && m.amount.length) { + for (var i = 0; i < m.amount.length; ++i) + $root.cosmos.Coin.encode(m.amount[i], w.uint32(26).fork()).ldelim(); + } return w; }; - DecCoin.decode = function decode(r, l) { + MsgSend.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.DecCoin(); + m = new $root.cosmos.bank.MsgSend(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.denom = r.string(); + m.fromAddress = r.bytes(); break; case 2: - m.amount = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return DecCoin; - })(); - v1.IntProto = (function () { - function IntProto(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - IntProto.prototype.int = ""; - IntProto.create = function create(properties) { - return new IntProto(properties); - }; - IntProto.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.int != null && Object.hasOwnProperty.call(m, "int")) w.uint32(10).string(m.int); - return w; - }; - IntProto.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.IntProto(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.int = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return IntProto; - })(); - v1.DecProto = (function () { - function DecProto(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - DecProto.prototype.dec = ""; - DecProto.create = function create(properties) { - return new DecProto(properties); - }; - DecProto.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.dec != null && Object.hasOwnProperty.call(m, "dec")) w.uint32(10).string(m.dec); - return w; - }; - DecProto.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.DecProto(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.dec = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return DecProto; - })(); - v1.ValAddresses = (function () { - function ValAddresses(p) { - this.addresses = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - ValAddresses.prototype.addresses = $util.emptyArray; - ValAddresses.create = function create(properties) { - return new ValAddresses(properties); - }; - ValAddresses.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.addresses != null && m.addresses.length) { - for (var i = 0; i < m.addresses.length; ++i) w.uint32(10).bytes(m.addresses[i]); - } - return w; - }; - ValAddresses.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.ValAddresses(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.addresses && m.addresses.length)) m.addresses = []; - m.addresses.push(r.bytes()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return ValAddresses; - })(); - v1.GasInfo = (function () { - function GasInfo(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - GasInfo.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - GasInfo.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - GasInfo.create = function create(properties) { - return new GasInfo(properties); - }; - GasInfo.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.gasWanted != null && Object.hasOwnProperty.call(m, "gasWanted")) - w.uint32(8).uint64(m.gasWanted); - if (m.gasUsed != null && Object.hasOwnProperty.call(m, "gasUsed")) w.uint32(16).uint64(m.gasUsed); - return w; - }; - GasInfo.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.GasInfo(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.gasWanted = r.uint64(); - break; - case 2: - m.gasUsed = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return GasInfo; - })(); - v1.Result = (function () { - function Result(p) { - this.events = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - Result.prototype.data = $util.newBuffer([]); - Result.prototype.log = ""; - Result.prototype.events = $util.emptyArray; - Result.create = function create(properties) { - return new Result(properties); - }; - Result.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(10).bytes(m.data); - if (m.log != null && Object.hasOwnProperty.call(m, "log")) w.uint32(18).string(m.log); - if (m.events != null && m.events.length) { - for (var i = 0; i < m.events.length; ++i) - $root.tendermint.abci.types.Event.encode(m.events[i], w.uint32(26).fork()).ldelim(); - } - return w; - }; - Result.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.Result(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.data = r.bytes(); - break; - case 2: - m.log = r.string(); + m.toAddress = r.bytes(); break; case 3: - if (!(m.events && m.events.length)) m.events = []; - m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); + if (!(m.amount && m.amount.length)) m.amount = []; + m.amount.push($root.cosmos.Coin.decode(r, r.uint32())); break; default: r.skipType(t & 7); @@ -518,39 +524,42 @@ $root.cosmos_sdk = (function () { } return m; }; - return Result; + return MsgSend; })(); - v1.SimulationResponse = (function () { - function SimulationResponse(p) { + bank.Input = (function () { + function Input(p) { + this.coins = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - SimulationResponse.prototype.gasInfo = null; - SimulationResponse.prototype.result = null; - SimulationResponse.create = function create(properties) { - return new SimulationResponse(properties); + Input.prototype.address = $util.newBuffer([]); + Input.prototype.coins = $util.emptyArray; + Input.create = function create(properties) { + return new Input(properties); }; - SimulationResponse.encode = function encode(m, w) { + Input.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.gasInfo != null && Object.hasOwnProperty.call(m, "gasInfo")) - $root.cosmos_sdk.v1.GasInfo.encode(m.gasInfo, w.uint32(10).fork()).ldelim(); - if (m.result != null && Object.hasOwnProperty.call(m, "result")) - $root.cosmos_sdk.v1.Result.encode(m.result, w.uint32(18).fork()).ldelim(); + if (m.address != null && Object.hasOwnProperty.call(m, "address")) w.uint32(10).bytes(m.address); + if (m.coins != null && m.coins.length) { + for (var i = 0; i < m.coins.length; ++i) + $root.cosmos.Coin.encode(m.coins[i], w.uint32(18).fork()).ldelim(); + } return w; }; - SimulationResponse.decode = function decode(r, l) { + Input.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.SimulationResponse(); + m = new $root.cosmos.bank.Input(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.gasInfo = $root.cosmos_sdk.v1.GasInfo.decode(r, r.uint32()); + m.address = r.bytes(); break; case 2: - m.result = $root.cosmos_sdk.v1.Result.decode(r, r.uint32()); + if (!(m.coins && m.coins.length)) m.coins = []; + m.coins.push($root.cosmos.Coin.decode(r, r.uint32())); break; default: r.skipType(t & 7); @@ -559,37 +568,42 @@ $root.cosmos_sdk = (function () { } return m; }; - return SimulationResponse; + return Input; })(); - v1.MsgData = (function () { - function MsgData(p) { + bank.Output = (function () { + function Output(p) { + this.coins = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - MsgData.prototype.msgType = ""; - MsgData.prototype.data = $util.newBuffer([]); - MsgData.create = function create(properties) { - return new MsgData(properties); + Output.prototype.address = $util.newBuffer([]); + Output.prototype.coins = $util.emptyArray; + Output.create = function create(properties) { + return new Output(properties); }; - MsgData.encode = function encode(m, w) { + Output.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.msgType != null && Object.hasOwnProperty.call(m, "msgType")) w.uint32(10).string(m.msgType); - if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(18).bytes(m.data); + if (m.address != null && Object.hasOwnProperty.call(m, "address")) w.uint32(10).bytes(m.address); + if (m.coins != null && m.coins.length) { + for (var i = 0; i < m.coins.length; ++i) + $root.cosmos.Coin.encode(m.coins[i], w.uint32(18).fork()).ldelim(); + } return w; }; - MsgData.decode = function decode(r, l) { + Output.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.MsgData(); + m = new $root.cosmos.bank.Output(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.msgType = r.string(); + m.address = r.bytes(); break; case 2: - m.data = r.bytes(); + if (!(m.coins && m.coins.length)) m.coins = []; + m.coins.push($root.cosmos.Coin.decode(r, r.uint32())); break; default: r.skipType(t & 7); @@ -598,37 +612,47 @@ $root.cosmos_sdk = (function () { } return m; }; - return MsgData; + return Output; })(); - v1.TxData = (function () { - function TxData(p) { - this.data = []; + bank.MsgMultiSend = (function () { + function MsgMultiSend(p) { + this.inputs = []; + this.outputs = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - TxData.prototype.data = $util.emptyArray; - TxData.create = function create(properties) { - return new TxData(properties); + MsgMultiSend.prototype.inputs = $util.emptyArray; + MsgMultiSend.prototype.outputs = $util.emptyArray; + MsgMultiSend.create = function create(properties) { + return new MsgMultiSend(properties); }; - TxData.encode = function encode(m, w) { + MsgMultiSend.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.data != null && m.data.length) { - for (var i = 0; i < m.data.length; ++i) - $root.cosmos_sdk.v1.MsgData.encode(m.data[i], w.uint32(10).fork()).ldelim(); + if (m.inputs != null && m.inputs.length) { + for (var i = 0; i < m.inputs.length; ++i) + $root.cosmos.bank.Input.encode(m.inputs[i], w.uint32(10).fork()).ldelim(); + } + if (m.outputs != null && m.outputs.length) { + for (var i = 0; i < m.outputs.length; ++i) + $root.cosmos.bank.Output.encode(m.outputs[i], w.uint32(18).fork()).ldelim(); } return w; }; - TxData.decode = function decode(r, l) { + MsgMultiSend.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.v1.TxData(); + m = new $root.cosmos.bank.MsgMultiSend(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - if (!(m.data && m.data.length)) m.data = []; - m.data.push($root.cosmos_sdk.v1.MsgData.decode(r, r.uint32())); + if (!(m.inputs && m.inputs.length)) m.inputs = []; + m.inputs.push($root.cosmos.bank.Input.decode(r, r.uint32())); + break; + case 2: + if (!(m.outputs && m.outputs.length)) m.outputs = []; + m.outputs.push($root.cosmos.bank.Output.decode(r, r.uint32())); break; default: r.skipType(t & 7); @@ -637,54 +661,634 @@ $root.cosmos_sdk = (function () { } return m; }; - return TxData; + return MsgMultiSend; })(); - return v1; + bank.Supply = (function () { + function Supply(p) { + this.total = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Supply.prototype.total = $util.emptyArray; + Supply.create = function create(properties) { + return new Supply(properties); + }; + Supply.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.total != null && m.total.length) { + for (var i = 0; i < m.total.length; ++i) + $root.cosmos.Coin.encode(m.total[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + Supply.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.bank.Supply(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.total && m.total.length)) m.total = []; + m.total.push($root.cosmos.Coin.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Supply; + })(); + return bank; })(); - cosmos_sdk.tx = (function () { + cosmos.crypto = (function () { + var crypto = {}; + crypto.PublicKey = (function () { + function PublicKey(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + PublicKey.prototype.secp256k1 = $util.newBuffer([]); + PublicKey.prototype.ed25519 = $util.newBuffer([]); + PublicKey.prototype.sr25519 = $util.newBuffer([]); + PublicKey.prototype.multisig = null; + PublicKey.prototype.secp256r1 = $util.newBuffer([]); + PublicKey.prototype.anyPubkey = null; + var $oneOfFields; + Object.defineProperty(PublicKey.prototype, "sum", { + get: $util.oneOfGetter( + ($oneOfFields = ["secp256k1", "ed25519", "sr25519", "multisig", "secp256r1", "anyPubkey"]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + PublicKey.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.secp256k1 != null && Object.hasOwnProperty.call(m, "secp256k1")) + w.uint32(10).bytes(m.secp256k1); + if (m.ed25519 != null && Object.hasOwnProperty.call(m, "ed25519")) w.uint32(18).bytes(m.ed25519); + if (m.sr25519 != null && Object.hasOwnProperty.call(m, "sr25519")) w.uint32(26).bytes(m.sr25519); + if (m.multisig != null && Object.hasOwnProperty.call(m, "multisig")) + $root.cosmos.crypto.PubKeyMultisigThreshold.encode(m.multisig, w.uint32(34).fork()).ldelim(); + if (m.secp256r1 != null && Object.hasOwnProperty.call(m, "secp256r1")) + w.uint32(42).bytes(m.secp256r1); + if (m.anyPubkey != null && Object.hasOwnProperty.call(m, "anyPubkey")) + $root.google.protobuf.Any.encode(m.anyPubkey, w.uint32(122).fork()).ldelim(); + return w; + }; + PublicKey.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.crypto.PublicKey(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.secp256k1 = r.bytes(); + break; + case 2: + m.ed25519 = r.bytes(); + break; + case 3: + m.sr25519 = r.bytes(); + break; + case 4: + m.multisig = $root.cosmos.crypto.PubKeyMultisigThreshold.decode(r, r.uint32()); + break; + case 5: + m.secp256r1 = r.bytes(); + break; + case 15: + m.anyPubkey = $root.google.protobuf.Any.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return PublicKey; + })(); + crypto.PubKeyMultisigThreshold = (function () { + function PubKeyMultisigThreshold(p) { + this.publicKeys = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + PubKeyMultisigThreshold.prototype.threshold = 0; + PubKeyMultisigThreshold.prototype.publicKeys = $util.emptyArray; + PubKeyMultisigThreshold.create = function create(properties) { + return new PubKeyMultisigThreshold(properties); + }; + PubKeyMultisigThreshold.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.threshold != null && Object.hasOwnProperty.call(m, "threshold")) + w.uint32(8).uint32(m.threshold); + if (m.publicKeys != null && m.publicKeys.length) { + for (var i = 0; i < m.publicKeys.length; ++i) + $root.cosmos.crypto.PublicKey.encode(m.publicKeys[i], w.uint32(18).fork()).ldelim(); + } + return w; + }; + PubKeyMultisigThreshold.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.crypto.PubKeyMultisigThreshold(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.threshold = r.uint32(); + break; + case 2: + if (!(m.publicKeys && m.publicKeys.length)) m.publicKeys = []; + m.publicKeys.push($root.cosmos.crypto.PublicKey.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return PubKeyMultisigThreshold; + })(); + crypto.MultiSignature = (function () { + function MultiSignature(p) { + this.signatures = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + MultiSignature.prototype.signatures = $util.emptyArray; + MultiSignature.create = function create(properties) { + return new MultiSignature(properties); + }; + MultiSignature.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.signatures != null && m.signatures.length) { + for (var i = 0; i < m.signatures.length; ++i) w.uint32(10).bytes(m.signatures[i]); + } + return w; + }; + MultiSignature.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.crypto.MultiSignature(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.signatures && m.signatures.length)) m.signatures = []; + m.signatures.push(r.bytes()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return MultiSignature; + })(); + crypto.CompactBitArray = (function () { + function CompactBitArray(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + CompactBitArray.prototype.extraBitsStored = 0; + CompactBitArray.prototype.elems = $util.newBuffer([]); + CompactBitArray.create = function create(properties) { + return new CompactBitArray(properties); + }; + CompactBitArray.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.extraBitsStored != null && Object.hasOwnProperty.call(m, "extraBitsStored")) + w.uint32(8).uint32(m.extraBitsStored); + if (m.elems != null && Object.hasOwnProperty.call(m, "elems")) w.uint32(18).bytes(m.elems); + return w; + }; + CompactBitArray.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.crypto.CompactBitArray(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.extraBitsStored = r.uint32(); + break; + case 2: + m.elems = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return CompactBitArray; + })(); + return crypto; + })(); + cosmos.tx = (function () { var tx = {}; - tx.v1 = (function () { - var v1 = {}; - v1.Tx = (function () { - function Tx(p) { - this.signatures = []; + tx.Tx = (function () { + function Tx(p) { + this.signatures = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Tx.prototype.body = null; + Tx.prototype.authInfo = null; + Tx.prototype.signatures = $util.emptyArray; + Tx.create = function create(properties) { + return new Tx(properties); + }; + Tx.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.body != null && Object.hasOwnProperty.call(m, "body")) + $root.cosmos.tx.TxBody.encode(m.body, w.uint32(10).fork()).ldelim(); + if (m.authInfo != null && Object.hasOwnProperty.call(m, "authInfo")) + $root.cosmos.tx.AuthInfo.encode(m.authInfo, w.uint32(18).fork()).ldelim(); + if (m.signatures != null && m.signatures.length) { + for (var i = 0; i < m.signatures.length; ++i) w.uint32(26).bytes(m.signatures[i]); + } + return w; + }; + Tx.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.tx.Tx(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.body = $root.cosmos.tx.TxBody.decode(r, r.uint32()); + break; + case 2: + m.authInfo = $root.cosmos.tx.AuthInfo.decode(r, r.uint32()); + break; + case 3: + if (!(m.signatures && m.signatures.length)) m.signatures = []; + m.signatures.push(r.bytes()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Tx; + })(); + tx.TxRaw = (function () { + function TxRaw(p) { + this.signatures = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + TxRaw.prototype.bodyBytes = $util.newBuffer([]); + TxRaw.prototype.authInfoBytes = $util.newBuffer([]); + TxRaw.prototype.signatures = $util.emptyArray; + TxRaw.create = function create(properties) { + return new TxRaw(properties); + }; + TxRaw.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.bodyBytes != null && Object.hasOwnProperty.call(m, "bodyBytes")) + w.uint32(10).bytes(m.bodyBytes); + if (m.authInfoBytes != null && Object.hasOwnProperty.call(m, "authInfoBytes")) + w.uint32(18).bytes(m.authInfoBytes); + if (m.signatures != null && m.signatures.length) { + for (var i = 0; i < m.signatures.length; ++i) w.uint32(26).bytes(m.signatures[i]); + } + return w; + }; + TxRaw.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.tx.TxRaw(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.bodyBytes = r.bytes(); + break; + case 2: + m.authInfoBytes = r.bytes(); + break; + case 3: + if (!(m.signatures && m.signatures.length)) m.signatures = []; + m.signatures.push(r.bytes()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return TxRaw; + })(); + tx.SignDoc = (function () { + function SignDoc(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + SignDoc.prototype.bodyBytes = $util.newBuffer([]); + SignDoc.prototype.authInfoBytes = $util.newBuffer([]); + SignDoc.prototype.chainId = ""; + SignDoc.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + SignDoc.prototype.accountSequence = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + SignDoc.create = function create(properties) { + return new SignDoc(properties); + }; + SignDoc.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.bodyBytes != null && Object.hasOwnProperty.call(m, "bodyBytes")) + w.uint32(10).bytes(m.bodyBytes); + if (m.authInfoBytes != null && Object.hasOwnProperty.call(m, "authInfoBytes")) + w.uint32(18).bytes(m.authInfoBytes); + if (m.chainId != null && Object.hasOwnProperty.call(m, "chainId")) w.uint32(26).string(m.chainId); + if (m.accountNumber != null && Object.hasOwnProperty.call(m, "accountNumber")) + w.uint32(32).uint64(m.accountNumber); + if (m.accountSequence != null && Object.hasOwnProperty.call(m, "accountSequence")) + w.uint32(40).uint64(m.accountSequence); + return w; + }; + SignDoc.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.tx.SignDoc(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.bodyBytes = r.bytes(); + break; + case 2: + m.authInfoBytes = r.bytes(); + break; + case 3: + m.chainId = r.string(); + break; + case 4: + m.accountNumber = r.uint64(); + break; + case 5: + m.accountSequence = r.uint64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return SignDoc; + })(); + tx.TxBody = (function () { + function TxBody(p) { + this.messages = []; + this.extensionOptions = []; + this.nonCriticalExtensionOptions = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + TxBody.prototype.messages = $util.emptyArray; + TxBody.prototype.memo = ""; + TxBody.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + TxBody.prototype.extensionOptions = $util.emptyArray; + TxBody.prototype.nonCriticalExtensionOptions = $util.emptyArray; + TxBody.create = function create(properties) { + return new TxBody(properties); + }; + TxBody.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.messages != null && m.messages.length) { + for (var i = 0; i < m.messages.length; ++i) + $root.google.protobuf.Any.encode(m.messages[i], w.uint32(10).fork()).ldelim(); + } + if (m.memo != null && Object.hasOwnProperty.call(m, "memo")) w.uint32(18).string(m.memo); + if (m.timeoutHeight != null && Object.hasOwnProperty.call(m, "timeoutHeight")) + w.uint32(24).int64(m.timeoutHeight); + if (m.extensionOptions != null && m.extensionOptions.length) { + for (var i = 0; i < m.extensionOptions.length; ++i) + $root.google.protobuf.Any.encode(m.extensionOptions[i], w.uint32(8186).fork()).ldelim(); + } + if (m.nonCriticalExtensionOptions != null && m.nonCriticalExtensionOptions.length) { + for (var i = 0; i < m.nonCriticalExtensionOptions.length; ++i) + $root.google.protobuf.Any.encode( + m.nonCriticalExtensionOptions[i], + w.uint32(16378).fork(), + ).ldelim(); + } + return w; + }; + TxBody.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.tx.TxBody(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.messages && m.messages.length)) m.messages = []; + m.messages.push($root.google.protobuf.Any.decode(r, r.uint32())); + break; + case 2: + m.memo = r.string(); + break; + case 3: + m.timeoutHeight = r.int64(); + break; + case 1023: + if (!(m.extensionOptions && m.extensionOptions.length)) m.extensionOptions = []; + m.extensionOptions.push($root.google.protobuf.Any.decode(r, r.uint32())); + break; + case 2047: + if (!(m.nonCriticalExtensionOptions && m.nonCriticalExtensionOptions.length)) + m.nonCriticalExtensionOptions = []; + m.nonCriticalExtensionOptions.push($root.google.protobuf.Any.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return TxBody; + })(); + tx.AuthInfo = (function () { + function AuthInfo(p) { + this.signerInfos = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + AuthInfo.prototype.signerInfos = $util.emptyArray; + AuthInfo.prototype.fee = null; + AuthInfo.create = function create(properties) { + return new AuthInfo(properties); + }; + AuthInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.signerInfos != null && m.signerInfos.length) { + for (var i = 0; i < m.signerInfos.length; ++i) + $root.cosmos.tx.SignerInfo.encode(m.signerInfos[i], w.uint32(10).fork()).ldelim(); + } + if (m.fee != null && Object.hasOwnProperty.call(m, "fee")) + $root.cosmos.tx.Fee.encode(m.fee, w.uint32(18).fork()).ldelim(); + return w; + }; + AuthInfo.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.tx.AuthInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.signerInfos && m.signerInfos.length)) m.signerInfos = []; + m.signerInfos.push($root.cosmos.tx.SignerInfo.decode(r, r.uint32())); + break; + case 2: + m.fee = $root.cosmos.tx.Fee.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return AuthInfo; + })(); + tx.SignerInfo = (function () { + function SignerInfo(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + SignerInfo.prototype.publicKey = null; + SignerInfo.prototype.modeInfo = null; + SignerInfo.create = function create(properties) { + return new SignerInfo(properties); + }; + SignerInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) + $root.cosmos.crypto.PublicKey.encode(m.publicKey, w.uint32(10).fork()).ldelim(); + if (m.modeInfo != null && Object.hasOwnProperty.call(m, "modeInfo")) + $root.cosmos.tx.ModeInfo.encode(m.modeInfo, w.uint32(18).fork()).ldelim(); + return w; + }; + SignerInfo.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.tx.SignerInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.publicKey = $root.cosmos.crypto.PublicKey.decode(r, r.uint32()); + break; + case 2: + m.modeInfo = $root.cosmos.tx.ModeInfo.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return SignerInfo; + })(); + tx.ModeInfo = (function () { + function ModeInfo(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + ModeInfo.prototype.single = null; + ModeInfo.prototype.multi = null; + var $oneOfFields; + Object.defineProperty(ModeInfo.prototype, "sum", { + get: $util.oneOfGetter(($oneOfFields = ["single", "multi"])), + set: $util.oneOfSetter($oneOfFields), + }); + ModeInfo.create = function create(properties) { + return new ModeInfo(properties); + }; + ModeInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.single != null && Object.hasOwnProperty.call(m, "single")) + $root.cosmos.tx.ModeInfo.Single.encode(m.single, w.uint32(10).fork()).ldelim(); + if (m.multi != null && Object.hasOwnProperty.call(m, "multi")) + $root.cosmos.tx.ModeInfo.Multi.encode(m.multi, w.uint32(18).fork()).ldelim(); + return w; + }; + ModeInfo.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.tx.ModeInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.single = $root.cosmos.tx.ModeInfo.Single.decode(r, r.uint32()); + break; + case 2: + m.multi = $root.cosmos.tx.ModeInfo.Multi.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + ModeInfo.Single = (function () { + function Single(p) { if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - Tx.prototype.body = null; - Tx.prototype.authInfo = null; - Tx.prototype.signatures = $util.emptyArray; - Tx.create = function create(properties) { - return new Tx(properties); + Single.prototype.mode = 0; + Single.create = function create(properties) { + return new Single(properties); }; - Tx.encode = function encode(m, w) { + Single.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.body != null && Object.hasOwnProperty.call(m, "body")) - $root.cosmos_sdk.tx.v1.TxBody.encode(m.body, w.uint32(10).fork()).ldelim(); - if (m.authInfo != null && Object.hasOwnProperty.call(m, "authInfo")) - $root.cosmos_sdk.tx.v1.AuthInfo.encode(m.authInfo, w.uint32(18).fork()).ldelim(); - if (m.signatures != null && m.signatures.length) { - for (var i = 0; i < m.signatures.length; ++i) w.uint32(26).bytes(m.signatures[i]); - } + if (m.mode != null && Object.hasOwnProperty.call(m, "mode")) w.uint32(8).int32(m.mode); return w; }; - Tx.decode = function decode(r, l) { + Single.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.Tx(); + m = new $root.cosmos.tx.ModeInfo.Single(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.body = $root.cosmos_sdk.tx.v1.TxBody.decode(r, r.uint32()); - break; - case 2: - m.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.decode(r, r.uint32()); - break; - case 3: - if (!(m.signatures && m.signatures.length)) m.signatures = []; - m.signatures.push(r.bytes()); + m.mode = r.int32(); break; default: r.skipType(t & 7); @@ -693,56 +1297,43 @@ $root.cosmos_sdk = (function () { } return m; }; - return Tx; + return Single; })(); - v1.SignDoc = (function () { - function SignDoc(p) { + ModeInfo.Multi = (function () { + function Multi(p) { + this.modeInfos = []; if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - SignDoc.prototype.body = null; - SignDoc.prototype.authInfo = null; - SignDoc.prototype.chainId = ""; - SignDoc.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - SignDoc.prototype.accountSequence = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - SignDoc.create = function create(properties) { - return new SignDoc(properties); + Multi.prototype.bitarray = null; + Multi.prototype.modeInfos = $util.emptyArray; + Multi.create = function create(properties) { + return new Multi(properties); }; - SignDoc.encode = function encode(m, w) { + Multi.encode = function encode(m, w) { if (!w) w = $Writer.create(); - if (m.body != null && Object.hasOwnProperty.call(m, "body")) - $root.cosmos_sdk.tx.v1.TxBody.encode(m.body, w.uint32(10).fork()).ldelim(); - if (m.authInfo != null && Object.hasOwnProperty.call(m, "authInfo")) - $root.cosmos_sdk.tx.v1.AuthInfo.encode(m.authInfo, w.uint32(18).fork()).ldelim(); - if (m.chainId != null && Object.hasOwnProperty.call(m, "chainId")) w.uint32(26).string(m.chainId); - if (m.accountNumber != null && Object.hasOwnProperty.call(m, "accountNumber")) - w.uint32(32).uint64(m.accountNumber); - if (m.accountSequence != null && Object.hasOwnProperty.call(m, "accountSequence")) - w.uint32(40).uint64(m.accountSequence); + if (m.bitarray != null && Object.hasOwnProperty.call(m, "bitarray")) + $root.cosmos.crypto.CompactBitArray.encode(m.bitarray, w.uint32(10).fork()).ldelim(); + if (m.modeInfos != null && m.modeInfos.length) { + for (var i = 0; i < m.modeInfos.length; ++i) + $root.cosmos.tx.ModeInfo.encode(m.modeInfos[i], w.uint32(18).fork()).ldelim(); + } return w; }; - SignDoc.decode = function decode(r, l) { + Multi.decode = function decode(r, l) { if (!(r instanceof $Reader)) r = $Reader.create(r); var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.SignDoc(); + m = new $root.cosmos.tx.ModeInfo.Multi(); while (r.pos < c) { var t = r.uint32(); switch (t >>> 3) { case 1: - m.body = $root.cosmos_sdk.tx.v1.TxBody.decode(r, r.uint32()); + m.bitarray = $root.cosmos.crypto.CompactBitArray.decode(r, r.uint32()); break; case 2: - m.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.decode(r, r.uint32()); - break; - case 3: - m.chainId = r.string(); - break; - case 4: - m.accountNumber = r.uint64(); - break; - case 5: - m.accountSequence = r.uint64(); + if (!(m.modeInfos && m.modeInfos.length)) m.modeInfos = []; + m.modeInfos.push($root.cosmos.tx.ModeInfo.decode(r, r.uint32())); break; default: r.skipType(t & 7); @@ -751,566 +1342,72 @@ $root.cosmos_sdk = (function () { } return m; }; - return SignDoc; + return Multi; })(); - v1.TxBody = (function () { - function TxBody(p) { - this.messages = []; - this.extensionOptions = []; - this.nonCriticalExtensionOptions = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + return ModeInfo; + })(); + tx.Fee = (function () { + function Fee(p) { + this.amount = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Fee.prototype.amount = $util.emptyArray; + Fee.prototype.gasLimit = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Fee.create = function create(properties) { + return new Fee(properties); + }; + Fee.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.amount != null && m.amount.length) { + for (var i = 0; i < m.amount.length; ++i) + $root.cosmos.Coin.encode(m.amount[i], w.uint32(10).fork()).ldelim(); } - TxBody.prototype.messages = $util.emptyArray; - TxBody.prototype.memo = ""; - TxBody.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; - TxBody.prototype.extensionOptions = $util.emptyArray; - TxBody.prototype.nonCriticalExtensionOptions = $util.emptyArray; - TxBody.create = function create(properties) { - return new TxBody(properties); - }; - TxBody.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.messages != null && m.messages.length) { - for (var i = 0; i < m.messages.length; ++i) - $root.google.protobuf.Any.encode(m.messages[i], w.uint32(10).fork()).ldelim(); + if (m.gasLimit != null && Object.hasOwnProperty.call(m, "gasLimit")) w.uint32(16).uint64(m.gasLimit); + return w; + }; + Fee.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos.tx.Fee(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.amount && m.amount.length)) m.amount = []; + m.amount.push($root.cosmos.Coin.decode(r, r.uint32())); + break; + case 2: + m.gasLimit = r.uint64(); + break; + default: + r.skipType(t & 7); + break; } - if (m.memo != null && Object.hasOwnProperty.call(m, "memo")) w.uint32(18).string(m.memo); - if (m.timeoutHeight != null && Object.hasOwnProperty.call(m, "timeoutHeight")) - w.uint32(24).int64(m.timeoutHeight); - if (m.extensionOptions != null && m.extensionOptions.length) { - for (var i = 0; i < m.extensionOptions.length; ++i) - $root.google.protobuf.Any.encode(m.extensionOptions[i], w.uint32(8186).fork()).ldelim(); - } - if (m.nonCriticalExtensionOptions != null && m.nonCriticalExtensionOptions.length) { - for (var i = 0; i < m.nonCriticalExtensionOptions.length; ++i) - $root.google.protobuf.Any.encode( - m.nonCriticalExtensionOptions[i], - w.uint32(16378).fork(), - ).ldelim(); - } - return w; - }; - TxBody.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.TxBody(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.messages && m.messages.length)) m.messages = []; - m.messages.push($root.google.protobuf.Any.decode(r, r.uint32())); - break; - case 2: - m.memo = r.string(); - break; - case 3: - m.timeoutHeight = r.int64(); - break; - case 1023: - if (!(m.extensionOptions && m.extensionOptions.length)) m.extensionOptions = []; - m.extensionOptions.push($root.google.protobuf.Any.decode(r, r.uint32())); - break; - case 2047: - if (!(m.nonCriticalExtensionOptions && m.nonCriticalExtensionOptions.length)) - m.nonCriticalExtensionOptions = []; - m.nonCriticalExtensionOptions.push($root.google.protobuf.Any.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return TxBody; - })(); - v1.AuthInfo = (function () { - function AuthInfo(p) { - this.signerInfos = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; } - AuthInfo.prototype.signerInfos = $util.emptyArray; - AuthInfo.prototype.fee = null; - AuthInfo.create = function create(properties) { - return new AuthInfo(properties); - }; - AuthInfo.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.signerInfos != null && m.signerInfos.length) { - for (var i = 0; i < m.signerInfos.length; ++i) - $root.cosmos_sdk.tx.v1.SignerInfo.encode(m.signerInfos[i], w.uint32(10).fork()).ldelim(); - } - if (m.fee != null && Object.hasOwnProperty.call(m, "fee")) - $root.cosmos_sdk.tx.v1.Fee.encode(m.fee, w.uint32(18).fork()).ldelim(); - return w; - }; - AuthInfo.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.AuthInfo(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.signerInfos && m.signerInfos.length)) m.signerInfos = []; - m.signerInfos.push($root.cosmos_sdk.tx.v1.SignerInfo.decode(r, r.uint32())); - break; - case 2: - m.fee = $root.cosmos_sdk.tx.v1.Fee.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return AuthInfo; - })(); - v1.SignerInfo = (function () { - function SignerInfo(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - SignerInfo.prototype.publicKey = null; - SignerInfo.prototype.modeInfo = null; - SignerInfo.create = function create(properties) { - return new SignerInfo(properties); - }; - SignerInfo.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey")) - $root.google.protobuf.Any.encode(m.publicKey, w.uint32(10).fork()).ldelim(); - if (m.modeInfo != null && Object.hasOwnProperty.call(m, "modeInfo")) - $root.cosmos_sdk.tx.v1.ModeInfo.encode(m.modeInfo, w.uint32(18).fork()).ldelim(); - return w; - }; - SignerInfo.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.SignerInfo(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.publicKey = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 2: - m.modeInfo = $root.cosmos_sdk.tx.v1.ModeInfo.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return SignerInfo; - })(); - v1.ModeInfo = (function () { - function ModeInfo(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - ModeInfo.prototype.single = null; - ModeInfo.prototype.multi = null; - var $oneOfFields; - Object.defineProperty(ModeInfo.prototype, "sum", { - get: $util.oneOfGetter(($oneOfFields = ["single", "multi"])), - set: $util.oneOfSetter($oneOfFields), - }); - ModeInfo.create = function create(properties) { - return new ModeInfo(properties); - }; - ModeInfo.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.single != null && Object.hasOwnProperty.call(m, "single")) - $root.cosmos_sdk.tx.v1.ModeInfo.Single.encode(m.single, w.uint32(10).fork()).ldelim(); - if (m.multi != null && Object.hasOwnProperty.call(m, "multi")) - $root.cosmos_sdk.tx.v1.ModeInfo.Multi.encode(m.multi, w.uint32(18).fork()).ldelim(); - return w; - }; - ModeInfo.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.ModeInfo(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.single = $root.cosmos_sdk.tx.v1.ModeInfo.Single.decode(r, r.uint32()); - break; - case 2: - m.multi = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - ModeInfo.Single = (function () { - function Single(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - Single.prototype.mode = 0; - Single.create = function create(properties) { - return new Single(properties); - }; - Single.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.mode != null && Object.hasOwnProperty.call(m, "mode")) w.uint32(8).int32(m.mode); - return w; - }; - Single.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.ModeInfo.Single(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.mode = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return Single; - })(); - ModeInfo.Multi = (function () { - function Multi(p) { - this.modeInfos = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - Multi.prototype.bitarray = null; - Multi.prototype.modeInfos = $util.emptyArray; - Multi.create = function create(properties) { - return new Multi(properties); - }; - Multi.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.bitarray != null && Object.hasOwnProperty.call(m, "bitarray")) - $root.cosmos_sdk.crypto.v1.CompactBitArray.encode(m.bitarray, w.uint32(10).fork()).ldelim(); - if (m.modeInfos != null && m.modeInfos.length) { - for (var i = 0; i < m.modeInfos.length; ++i) - $root.cosmos_sdk.tx.v1.ModeInfo.encode(m.modeInfos[i], w.uint32(18).fork()).ldelim(); - } - return w; - }; - Multi.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.ModeInfo.Multi(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.decode(r, r.uint32()); - break; - case 2: - if (!(m.modeInfos && m.modeInfos.length)) m.modeInfos = []; - m.modeInfos.push($root.cosmos_sdk.tx.v1.ModeInfo.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return Multi; - })(); - return ModeInfo; - })(); - v1.Fee = (function () { - function Fee(p) { - this.amount = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - Fee.prototype.amount = $util.emptyArray; - Fee.prototype.gasLimit = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - Fee.create = function create(properties) { - return new Fee(properties); - }; - Fee.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.amount != null && m.amount.length) { - for (var i = 0; i < m.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.amount[i], w.uint32(10).fork()).ldelim(); - } - if (m.gasLimit != null && Object.hasOwnProperty.call(m, "gasLimit")) - w.uint32(16).uint64(m.gasLimit); - return w; - }; - Fee.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.tx.v1.Fee(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.amount && m.amount.length)) m.amount = []; - m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - case 2: - m.gasLimit = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return Fee; - })(); - return v1; + return m; + }; + return Fee; })(); tx.signing = (function () { var signing = {}; - signing.v1 = (function () { - var v1 = {}; - v1.SignMode = (function () { - var valuesById = {}, - values = Object.create(valuesById); - values[(valuesById[0] = "SIGN_MODE_UNSPECIFIED")] = 0; - values[(valuesById[1] = "SIGN_MODE_DIRECT")] = 1; - values[(valuesById[2] = "SIGN_MODE_TEXTUAL")] = 2; - values[(valuesById[127] = "SIGN_MODE_LEGACY_AMINO_JSON")] = 127; - return values; - })(); - return v1; + signing.SignMode = (function () { + var valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "SIGN_MODE_UNSPECIFIED")] = 0; + values[(valuesById[1] = "SIGN_MODE_DIRECT")] = 1; + values[(valuesById[2] = "SIGN_MODE_TEXTUAL")] = 2; + values[(valuesById[127] = "SIGN_MODE_LEGACY_AMINO_JSON")] = 127; + return values; })(); return signing; })(); return tx; })(); - cosmos_sdk.crypto = (function () { - var crypto = {}; - crypto.v1 = (function () { - var v1 = {}; - v1.PublicKey = (function () { - function PublicKey(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - PublicKey.prototype.secp256k1 = $util.newBuffer([]); - PublicKey.prototype.ed25519 = $util.newBuffer([]); - PublicKey.prototype.sr25519 = $util.newBuffer([]); - PublicKey.prototype.multisig = null; - PublicKey.prototype.secp256r1 = $util.newBuffer([]); - PublicKey.prototype.anyPubkey = null; - var $oneOfFields; - Object.defineProperty(PublicKey.prototype, "sum", { - get: $util.oneOfGetter( - ($oneOfFields = ["secp256k1", "ed25519", "sr25519", "multisig", "secp256r1", "anyPubkey"]), - ), - set: $util.oneOfSetter($oneOfFields), - }); - PublicKey.create = function create(properties) { - return new PublicKey(properties); - }; - PublicKey.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.secp256k1 != null && Object.hasOwnProperty.call(m, "secp256k1")) - w.uint32(10).bytes(m.secp256k1); - if (m.ed25519 != null && Object.hasOwnProperty.call(m, "ed25519")) w.uint32(18).bytes(m.ed25519); - if (m.sr25519 != null && Object.hasOwnProperty.call(m, "sr25519")) w.uint32(26).bytes(m.sr25519); - if (m.multisig != null && Object.hasOwnProperty.call(m, "multisig")) - $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.encode( - m.multisig, - w.uint32(34).fork(), - ).ldelim(); - if (m.secp256r1 != null && Object.hasOwnProperty.call(m, "secp256r1")) - w.uint32(42).bytes(m.secp256r1); - if (m.anyPubkey != null && Object.hasOwnProperty.call(m, "anyPubkey")) - $root.google.protobuf.Any.encode(m.anyPubkey, w.uint32(122).fork()).ldelim(); - return w; - }; - PublicKey.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.crypto.v1.PublicKey(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.secp256k1 = r.bytes(); - break; - case 2: - m.ed25519 = r.bytes(); - break; - case 3: - m.sr25519 = r.bytes(); - break; - case 4: - m.multisig = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.decode(r, r.uint32()); - break; - case 5: - m.secp256r1 = r.bytes(); - break; - case 15: - m.anyPubkey = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return PublicKey; - })(); - v1.PubKeyMultisigThreshold = (function () { - function PubKeyMultisigThreshold(p) { - this.publicKeys = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - PubKeyMultisigThreshold.prototype.threshold = 0; - PubKeyMultisigThreshold.prototype.publicKeys = $util.emptyArray; - PubKeyMultisigThreshold.create = function create(properties) { - return new PubKeyMultisigThreshold(properties); - }; - PubKeyMultisigThreshold.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.threshold != null && Object.hasOwnProperty.call(m, "threshold")) - w.uint32(8).uint32(m.threshold); - if (m.publicKeys != null && m.publicKeys.length) { - for (var i = 0; i < m.publicKeys.length; ++i) - $root.cosmos_sdk.crypto.v1.PublicKey.encode(m.publicKeys[i], w.uint32(18).fork()).ldelim(); - } - return w; - }; - PubKeyMultisigThreshold.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.threshold = r.uint32(); - break; - case 2: - if (!(m.publicKeys && m.publicKeys.length)) m.publicKeys = []; - m.publicKeys.push($root.cosmos_sdk.crypto.v1.PublicKey.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return PubKeyMultisigThreshold; - })(); - v1.MultiSignature = (function () { - function MultiSignature(p) { - this.signatures = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - MultiSignature.prototype.signatures = $util.emptyArray; - MultiSignature.create = function create(properties) { - return new MultiSignature(properties); - }; - MultiSignature.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.signatures != null && m.signatures.length) { - for (var i = 0; i < m.signatures.length; ++i) w.uint32(10).bytes(m.signatures[i]); - } - return w; - }; - MultiSignature.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.crypto.v1.MultiSignature(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.signatures && m.signatures.length)) m.signatures = []; - m.signatures.push(r.bytes()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return MultiSignature; - })(); - v1.CompactBitArray = (function () { - function CompactBitArray(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; - } - CompactBitArray.prototype.extraBitsStored = 0; - CompactBitArray.prototype.elems = $util.newBuffer([]); - CompactBitArray.create = function create(properties) { - return new CompactBitArray(properties); - }; - CompactBitArray.encode = function encode(m, w) { - if (!w) w = $Writer.create(); - if (m.extraBitsStored != null && Object.hasOwnProperty.call(m, "extraBitsStored")) - w.uint32(8).uint32(m.extraBitsStored); - if (m.elems != null && Object.hasOwnProperty.call(m, "elems")) w.uint32(18).bytes(m.elems); - return w; - }; - CompactBitArray.decode = function decode(r, l) { - if (!(r instanceof $Reader)) r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, - m = new $root.cosmos_sdk.crypto.v1.CompactBitArray(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.extraBitsStored = r.uint32(); - break; - case 2: - m.elems = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - return CompactBitArray; - })(); - return v1; - })(); - return crypto; - })(); - return cosmos_sdk; + return cosmos; })(); -$root.tendermint = (function () { +exports.tendermint = $root.tendermint = (function () { var tendermint = {}; tendermint.abci = (function () { var abci = {}; @@ -3663,7 +3760,7 @@ $root.tendermint = (function () { })(); return tendermint; })(); -$root.google = (function () { +exports.google = $root.google = (function () { var google = {}; google.protobuf = (function () { var protobuf = {}; From e59beb01acc3c753e48391365a01f3ec5dbba2dd Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 16 Jul 2020 15:13:13 +0200 Subject: [PATCH 5/5] proto-signing: Update for new proto definition structure --- packages/proto-signing/src/decorator.spec.ts | 4 +- packages/proto-signing/src/demo.spec.ts | 8 +- packages/proto-signing/src/msgs.spec.ts | 10 +- packages/proto-signing/src/registry.spec.ts | 6 +- packages/proto-signing/src/registry.ts | 12 +- .../types/generated/codecimpl.d.ts | 2927 +++++++++-------- packages/proto-signing/types/registry.d.ts | 4 +- 7 files changed, 1539 insertions(+), 1432 deletions(-) diff --git a/packages/proto-signing/src/decorator.spec.ts b/packages/proto-signing/src/decorator.spec.ts index d644f77b45..5ca42126f4 100644 --- a/packages/proto-signing/src/decorator.spec.ts +++ b/packages/proto-signing/src/decorator.spec.ts @@ -3,10 +3,10 @@ import { assert } from "@cosmjs/utils"; import { Message } from "protobufjs"; import { cosmosField, cosmosMessage } from "./decorator"; -import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; +import { cosmos, google } from "./generated/codecimpl"; import { Registry } from "./registry"; -const { TxBody } = cosmosSdk.tx.v1; +const { TxBody } = cosmos.tx; const { Any } = google.protobuf; describe("decorator demo", () => { diff --git a/packages/proto-signing/src/demo.spec.ts b/packages/proto-signing/src/demo.spec.ts index 2e623bd21d..818c20d091 100644 --- a/packages/proto-signing/src/demo.spec.ts +++ b/packages/proto-signing/src/demo.spec.ts @@ -5,15 +5,15 @@ import protobuf from "protobufjs"; import reflectionRoot from "./demo"; import demoJson from "./demo.json"; import demoProto from "./demo.proto"; -import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; +import { cosmos, google } from "./generated/codecimpl"; type MsgDemo = { readonly example: string; }; -const { Coin } = cosmosSdk.v1; -const { TxBody } = cosmosSdk.tx.v1; -const { MsgSend } = cosmosSdk.x.bank.v1; +const { Coin } = cosmos; +const { TxBody } = cosmos.tx; +const { MsgSend } = cosmos.bank; const { Any } = google.protobuf; function getTypeName(typeUrl: string): string { diff --git a/packages/proto-signing/src/msgs.spec.ts b/packages/proto-signing/src/msgs.spec.ts index bd7b8352ba..b4ce229c0f 100644 --- a/packages/proto-signing/src/msgs.spec.ts +++ b/packages/proto-signing/src/msgs.spec.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { fromHex } from "@cosmjs/encoding"; -import { cosmos_sdk as cosmosSdk } from "./generated/codecimpl"; +import { cosmos } from "./generated/codecimpl"; import { Coin, MsgSend } from "./msgs"; describe("msgs", () => { @@ -14,16 +14,16 @@ describe("msgs", () => { ]; const donation = new MsgSend({ from_address: alice, to_address: bob, amount }); - const expected = cosmosSdk.x.bank.v1.MsgSend.encode( - cosmosSdk.x.bank.v1.MsgSend.create({ + const expected = cosmos.bank.MsgSend.encode( + cosmos.bank.MsgSend.create({ fromAddress: alice, toAddress: bob, amount: [ - cosmosSdk.v1.Coin.create({ + cosmos.Coin.create({ denom: "utoken", amount: "123", }), - cosmosSdk.v1.Coin.create({ + cosmos.Coin.create({ denom: "ustake", amount: "654", }), diff --git a/packages/proto-signing/src/registry.spec.ts b/packages/proto-signing/src/registry.spec.ts index 352c287d65..c0e7d46238 100644 --- a/packages/proto-signing/src/registry.spec.ts +++ b/packages/proto-signing/src/registry.spec.ts @@ -2,10 +2,10 @@ import { assert } from "@cosmjs/utils"; import { MsgDemo as MsgDemoType } from "./demo"; -import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; +import { cosmos, google } from "./generated/codecimpl"; import { Registry } from "./registry"; -const { TxBody } = cosmosSdk.tx.v1; +const { TxBody } = cosmos.tx; const { Any } = google.protobuf; describe("registry demo", () => { @@ -22,7 +22,7 @@ describe("registry demo", () => { fromAddress: Uint8Array.from(Array.from({ length: 20 }, () => 1)), toAddress: Uint8Array.from(Array.from({ length: 20 }, () => 2)), amount: [coin], - }) as unknown) as cosmosSdk.x.bank.v1.MsgSend; + }) as unknown) as cosmos.bank.MsgSend; const msgSendBytes = MsgSend.encode(msgSend).finish(); const msgSendWrapped = Any.create({ type_url: "/cosmos.bank.MsgSend", diff --git a/packages/proto-signing/src/registry.ts b/packages/proto-signing/src/registry.ts index eb5d0e41c5..5a06b669ea 100644 --- a/packages/proto-signing/src/registry.ts +++ b/packages/proto-signing/src/registry.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ import protobuf from "protobufjs"; -import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; +import { cosmos, google } from "./generated/codecimpl"; export interface GeneratedType { readonly create: (properties?: { [k: string]: any }) => any; @@ -40,8 +40,8 @@ export class Registry { constructor(customTypes: Iterable<[string, GeneratedType]> = []) { const { cosmosCoin, cosmosMsgSend } = defaultTypeUrls; this.types = new Map([ - [cosmosCoin, cosmosSdk.v1.Coin], - [cosmosMsgSend, cosmosSdk.x.bank.v1.MsgSend], + [cosmosCoin, cosmos.Coin], + [cosmosMsgSend, cosmos.bank.MsgSend], ...customTypes, ]); } @@ -72,7 +72,7 @@ export class Registry { } public encodeTxBody(txBodyFields: TxBodyValue): Uint8Array { - const { TxBody } = cosmosSdk.tx.v1; + const { TxBody } = cosmos.tx; const { Any } = google.protobuf; const wrappedMessages = txBodyFields.messages.map((message) => { @@ -103,8 +103,8 @@ export class Registry { return decoded; } - public decodeTxBody(txBody: Uint8Array): cosmosSdk.tx.v1.TxBody { - const { TxBody } = cosmosSdk.tx.v1; + public decodeTxBody(txBody: Uint8Array): cosmos.tx.TxBody { + const { TxBody } = cosmos.tx; const decodedTxBody = TxBody.decode(txBody); return { diff --git a/packages/proto-signing/types/generated/codecimpl.d.ts b/packages/proto-signing/types/generated/codecimpl.d.ts index 8ae30088f4..63a4519bbc 100644 --- a/packages/proto-signing/types/generated/codecimpl.d.ts +++ b/packages/proto-signing/types/generated/codecimpl.d.ts @@ -1,1489 +1,1596 @@ import * as $protobuf from "protobufjs"; -/** Namespace cosmos_sdk. */ -export namespace cosmos_sdk { - /** Namespace x. */ - namespace x { - /** Namespace bank. */ - namespace bank { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgSend. */ - interface IMsgSend { - /** MsgSend fromAddress */ - fromAddress?: Uint8Array | null; +/** Namespace cosmos. */ +export namespace cosmos { + /** Properties of a Coin. */ + interface ICoin { + /** Coin denom */ + denom?: string | null; - /** MsgSend toAddress */ - toAddress?: Uint8Array | null; - - /** MsgSend amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a MsgSend. */ - class MsgSend implements IMsgSend { - /** - * Constructs a new MsgSend. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IMsgSend); - - /** MsgSend fromAddress. */ - public fromAddress: Uint8Array; - - /** MsgSend toAddress. */ - public toAddress: Uint8Array; - - /** MsgSend amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new MsgSend instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSend instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IMsgSend): cosmos_sdk.x.bank.v1.MsgSend; - - /** - * Encodes the specified MsgSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. - * @param m MsgSend message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IMsgSend, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSend message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.x.bank.v1.MsgSend; - } - - /** Properties of an Input. */ - interface IInput { - /** Input address */ - address?: Uint8Array | null; - - /** Input coins */ - coins?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents an Input. */ - class Input implements IInput { - /** - * Constructs a new Input. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IInput); - - /** Input address. */ - public address: Uint8Array; - - /** Input coins. */ - public coins: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Input instance using the specified properties. - * @param [properties] Properties to set - * @returns Input instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IInput): cosmos_sdk.x.bank.v1.Input; - - /** - * Encodes the specified Input message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. - * @param m Input message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IInput, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Input message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.x.bank.v1.Input; - } - - /** Properties of an Output. */ - interface IOutput { - /** Output address */ - address?: Uint8Array | null; - - /** Output coins */ - coins?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents an Output. */ - class Output implements IOutput { - /** - * Constructs a new Output. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IOutput); - - /** Output address. */ - public address: Uint8Array; - - /** Output coins. */ - public coins: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Output instance using the specified properties. - * @param [properties] Properties to set - * @returns Output instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IOutput): cosmos_sdk.x.bank.v1.Output; - - /** - * Encodes the specified Output message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. - * @param m Output message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IOutput, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Output message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.x.bank.v1.Output; - } - - /** Properties of a MsgMultiSend. */ - interface IMsgMultiSend { - /** MsgMultiSend inputs */ - inputs?: cosmos_sdk.x.bank.v1.IInput[] | null; - - /** MsgMultiSend outputs */ - outputs?: cosmos_sdk.x.bank.v1.IOutput[] | null; - } - - /** Represents a MsgMultiSend. */ - class MsgMultiSend implements IMsgMultiSend { - /** - * Constructs a new MsgMultiSend. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IMsgMultiSend); - - /** MsgMultiSend inputs. */ - public inputs: cosmos_sdk.x.bank.v1.IInput[]; - - /** MsgMultiSend outputs. */ - public outputs: cosmos_sdk.x.bank.v1.IOutput[]; - - /** - * Creates a new MsgMultiSend instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgMultiSend instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IMsgMultiSend, - ): cosmos_sdk.x.bank.v1.MsgMultiSend; - - /** - * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. - * @param m MsgMultiSend message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IMsgMultiSend, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgMultiSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.x.bank.v1.MsgMultiSend; - } - - /** Properties of a Supply. */ - interface ISupply { - /** Supply total */ - total?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a Supply. */ - class Supply implements ISupply { - /** - * Constructs a new Supply. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.ISupply); - - /** Supply total. */ - public total: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Supply instance using the specified properties. - * @param [properties] Properties to set - * @returns Supply instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.ISupply): cosmos_sdk.x.bank.v1.Supply; - - /** - * Encodes the specified Supply message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. - * @param m Supply message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.ISupply, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Supply message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.x.bank.v1.Supply; - } - } - } + /** Coin amount */ + amount?: string | null; } - /** Namespace v1. */ - namespace v1 { - /** Properties of a Coin. */ - interface ICoin { - /** Coin denom */ - denom?: string | null; - - /** Coin amount */ - amount?: string | null; - } - - /** Represents a Coin. */ - class Coin implements ICoin { - /** - * Constructs a new Coin. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.ICoin); - - /** Coin denom. */ - public denom: string; - - /** Coin amount. */ - public amount: string; - - /** - * Creates a new Coin instance using the specified properties. - * @param [properties] Properties to set - * @returns Coin instance - */ - public static create(properties?: cosmos_sdk.v1.ICoin): cosmos_sdk.v1.Coin; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. - * @param m Coin message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.ICoin, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Coin message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Coin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.Coin; - } - - /** Properties of a DecCoin. */ - interface IDecCoin { - /** DecCoin denom */ - denom?: string | null; - - /** DecCoin amount */ - amount?: string | null; - } - - /** Represents a DecCoin. */ - class DecCoin implements IDecCoin { - /** - * Constructs a new DecCoin. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IDecCoin); - - /** DecCoin denom. */ - public denom: string; - - /** DecCoin amount. */ - public amount: string; - - /** - * Creates a new DecCoin instance using the specified properties. - * @param [properties] Properties to set - * @returns DecCoin instance - */ - public static create(properties?: cosmos_sdk.v1.IDecCoin): cosmos_sdk.v1.DecCoin; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. - * @param m DecCoin message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IDecCoin, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DecCoin message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DecCoin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.DecCoin; - } - - /** Properties of an IntProto. */ - interface IIntProto { - /** IntProto int */ - int?: string | null; - } - - /** Represents an IntProto. */ - class IntProto implements IIntProto { - /** - * Constructs a new IntProto. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IIntProto); - - /** IntProto int. */ - public int: string; - - /** - * Creates a new IntProto instance using the specified properties. - * @param [properties] Properties to set - * @returns IntProto instance - */ - public static create(properties?: cosmos_sdk.v1.IIntProto): cosmos_sdk.v1.IntProto; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. - * @param m IntProto message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IIntProto, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IntProto message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns IntProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.IntProto; - } - - /** Properties of a DecProto. */ - interface IDecProto { - /** DecProto dec */ - dec?: string | null; - } - - /** Represents a DecProto. */ - class DecProto implements IDecProto { - /** - * Constructs a new DecProto. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IDecProto); - - /** DecProto dec. */ - public dec: string; - - /** - * Creates a new DecProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DecProto instance - */ - public static create(properties?: cosmos_sdk.v1.IDecProto): cosmos_sdk.v1.DecProto; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. - * @param m DecProto message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IDecProto, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DecProto message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DecProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.DecProto; - } - - /** Properties of a ValAddresses. */ - interface IValAddresses { - /** ValAddresses addresses */ - addresses?: Uint8Array[] | null; - } - - /** Represents a ValAddresses. */ - class ValAddresses implements IValAddresses { - /** - * Constructs a new ValAddresses. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IValAddresses); - - /** ValAddresses addresses. */ - public addresses: Uint8Array[]; - - /** - * Creates a new ValAddresses instance using the specified properties. - * @param [properties] Properties to set - * @returns ValAddresses instance - */ - public static create(properties?: cosmos_sdk.v1.IValAddresses): cosmos_sdk.v1.ValAddresses; - - /** - * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. - * @param m ValAddresses message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IValAddresses, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValAddresses message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValAddresses - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.ValAddresses; - } - - /** Properties of a GasInfo. */ - interface IGasInfo { - /** GasInfo gasWanted */ - gasWanted?: number | Long | null; - - /** GasInfo gasUsed */ - gasUsed?: number | Long | null; - } - - /** Represents a GasInfo. */ - class GasInfo implements IGasInfo { - /** - * Constructs a new GasInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IGasInfo); - - /** GasInfo gasWanted. */ - public gasWanted: number | Long; - - /** GasInfo gasUsed. */ - public gasUsed: number | Long; - - /** - * Creates a new GasInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GasInfo instance - */ - public static create(properties?: cosmos_sdk.v1.IGasInfo): cosmos_sdk.v1.GasInfo; - - /** - * Encodes the specified GasInfo message. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. - * @param m GasInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IGasInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GasInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns GasInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.GasInfo; - } - - /** Properties of a Result. */ - interface IResult { - /** Result data */ - data?: Uint8Array | null; - - /** Result log */ - log?: string | null; - - /** Result events */ - events?: tendermint.abci.types.IEvent[] | null; - } - - /** Represents a Result. */ - class Result implements IResult { - /** - * Constructs a new Result. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IResult); - - /** Result data. */ - public data: Uint8Array; - - /** Result log. */ - public log: string; - - /** Result events. */ - public events: tendermint.abci.types.IEvent[]; - - /** - * Creates a new Result instance using the specified properties. - * @param [properties] Properties to set - * @returns Result instance - */ - public static create(properties?: cosmos_sdk.v1.IResult): cosmos_sdk.v1.Result; - - /** - * Encodes the specified Result message. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. - * @param m Result message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IResult, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Result message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Result - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.Result; - } - - /** Properties of a SimulationResponse. */ - interface ISimulationResponse { - /** SimulationResponse gasInfo */ - gasInfo?: cosmos_sdk.v1.IGasInfo | null; - - /** SimulationResponse result */ - result?: cosmos_sdk.v1.IResult | null; - } - - /** Represents a SimulationResponse. */ - class SimulationResponse implements ISimulationResponse { - /** - * Constructs a new SimulationResponse. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.ISimulationResponse); - - /** SimulationResponse gasInfo. */ - public gasInfo?: cosmos_sdk.v1.IGasInfo | null; - - /** SimulationResponse result. */ - public result?: cosmos_sdk.v1.IResult | null; - - /** - * Creates a new SimulationResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulationResponse instance - */ - public static create(properties?: cosmos_sdk.v1.ISimulationResponse): cosmos_sdk.v1.SimulationResponse; - - /** - * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. - * @param m SimulationResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.ISimulationResponse, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SimulationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.SimulationResponse; - } - - /** Properties of a MsgData. */ - interface IMsgData { - /** MsgData msgType */ - msgType?: string | null; - - /** MsgData data */ - data?: Uint8Array | null; - } - - /** Represents a MsgData. */ - class MsgData implements IMsgData { - /** - * Constructs a new MsgData. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IMsgData); - - /** MsgData msgType. */ - public msgType: string; - - /** MsgData data. */ - public data: Uint8Array; - - /** - * Creates a new MsgData instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgData instance - */ - public static create(properties?: cosmos_sdk.v1.IMsgData): cosmos_sdk.v1.MsgData; - - /** - * Encodes the specified MsgData message. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. - * @param m MsgData message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.IMsgData, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgData message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.MsgData; - } - - /** Properties of a TxData. */ - interface ITxData { - /** TxData data */ - data?: cosmos_sdk.v1.IMsgData[] | null; - } - - /** Represents a TxData. */ - class TxData implements ITxData { - /** - * Constructs a new TxData. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.ITxData); - - /** TxData data. */ - public data: cosmos_sdk.v1.IMsgData[]; - - /** - * Creates a new TxData instance using the specified properties. - * @param [properties] Properties to set - * @returns TxData instance - */ - public static create(properties?: cosmos_sdk.v1.ITxData): cosmos_sdk.v1.TxData; - - /** - * Encodes the specified TxData message. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. - * @param m TxData message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.v1.ITxData, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TxData message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns TxData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.v1.TxData; - } + /** Represents a Coin. */ + class Coin implements ICoin { + /** + * Constructs a new Coin. + * @param [p] Properties to set + */ + constructor(p?: cosmos.ICoin); + + /** Coin denom. */ + public denom: string; + + /** Coin amount. */ + public amount: string; + + /** + * Creates a new Coin instance using the specified properties. + * @param [properties] Properties to set + * @returns Coin instance + */ + public static create(properties?: cosmos.ICoin): cosmos.Coin; + + /** + * Encodes the specified Coin message. Does not implicitly {@link cosmos.Coin.verify|verify} messages. + * @param m Coin message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.ICoin, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.Coin; } - /** Namespace tx. */ - namespace tx { - /** Namespace v1. */ - namespace v1 { - /** Properties of a Tx. */ - interface ITx { - /** Tx body */ - body?: cosmos_sdk.tx.v1.ITxBody | null; - - /** Tx authInfo */ - authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - - /** Tx signatures */ - signatures?: Uint8Array[] | null; - } - - /** Represents a Tx. */ - class Tx implements ITx { - /** - * Constructs a new Tx. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ITx); - - /** Tx body. */ - public body?: cosmos_sdk.tx.v1.ITxBody | null; - - /** Tx authInfo. */ - public authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - - /** Tx signatures. */ - public signatures: Uint8Array[]; - - /** - * Creates a new Tx instance using the specified properties. - * @param [properties] Properties to set - * @returns Tx instance - */ - public static create(properties?: cosmos_sdk.tx.v1.ITx): cosmos_sdk.tx.v1.Tx; - - /** - * Encodes the specified Tx message. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. - * @param m Tx message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ITx, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tx message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Tx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.Tx; - } - - /** Properties of a SignDoc. */ - interface ISignDoc { - /** SignDoc body */ - body?: cosmos_sdk.tx.v1.ITxBody | null; - - /** SignDoc authInfo */ - authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - - /** SignDoc chainId */ - chainId?: string | null; - - /** SignDoc accountNumber */ - accountNumber?: number | Long | null; - - /** SignDoc accountSequence */ - accountSequence?: number | Long | null; - } - - /** Represents a SignDoc. */ - class SignDoc implements ISignDoc { - /** - * Constructs a new SignDoc. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ISignDoc); - - /** SignDoc body. */ - public body?: cosmos_sdk.tx.v1.ITxBody | null; - - /** SignDoc authInfo. */ - public authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - - /** SignDoc chainId. */ - public chainId: string; - - /** SignDoc accountNumber. */ - public accountNumber: number | Long; - - /** SignDoc accountSequence. */ - public accountSequence: number | Long; - - /** - * Creates a new SignDoc instance using the specified properties. - * @param [properties] Properties to set - * @returns SignDoc instance - */ - public static create(properties?: cosmos_sdk.tx.v1.ISignDoc): cosmos_sdk.tx.v1.SignDoc; - - /** - * Encodes the specified SignDoc message. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. - * @param m SignDoc message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ISignDoc, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignDoc message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SignDoc - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.SignDoc; - } - - /** Properties of a TxBody. */ - interface ITxBody { - /** TxBody messages */ - messages?: google.protobuf.IAny[] | null; - - /** TxBody memo */ - memo?: string | null; - - /** TxBody timeoutHeight */ - timeoutHeight?: number | Long | null; - - /** TxBody extensionOptions */ - extensionOptions?: google.protobuf.IAny[] | null; - - /** TxBody nonCriticalExtensionOptions */ - nonCriticalExtensionOptions?: google.protobuf.IAny[] | null; - } - - /** Represents a TxBody. */ - class TxBody implements ITxBody { - /** - * Constructs a new TxBody. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ITxBody); - - /** TxBody messages. */ - public messages: google.protobuf.IAny[]; - - /** TxBody memo. */ - public memo: string; - - /** TxBody timeoutHeight. */ - public timeoutHeight: number | Long; - - /** TxBody extensionOptions. */ - public extensionOptions: google.protobuf.IAny[]; - - /** TxBody nonCriticalExtensionOptions. */ - public nonCriticalExtensionOptions: google.protobuf.IAny[]; - - /** - * Creates a new TxBody instance using the specified properties. - * @param [properties] Properties to set - * @returns TxBody instance - */ - public static create(properties?: cosmos_sdk.tx.v1.ITxBody): cosmos_sdk.tx.v1.TxBody; - - /** - * Encodes the specified TxBody message. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. - * @param m TxBody message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ITxBody, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TxBody message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns TxBody - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.TxBody; - } - - /** Properties of an AuthInfo. */ - interface IAuthInfo { - /** AuthInfo signerInfos */ - signerInfos?: cosmos_sdk.tx.v1.ISignerInfo[] | null; - - /** AuthInfo fee */ - fee?: cosmos_sdk.tx.v1.IFee | null; - } - - /** Represents an AuthInfo. */ - class AuthInfo implements IAuthInfo { - /** - * Constructs a new AuthInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.IAuthInfo); - - /** AuthInfo signerInfos. */ - public signerInfos: cosmos_sdk.tx.v1.ISignerInfo[]; - - /** AuthInfo fee. */ - public fee?: cosmos_sdk.tx.v1.IFee | null; - - /** - * Creates a new AuthInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AuthInfo instance - */ - public static create(properties?: cosmos_sdk.tx.v1.IAuthInfo): cosmos_sdk.tx.v1.AuthInfo; - - /** - * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. - * @param m AuthInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.IAuthInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuthInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns AuthInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.AuthInfo; - } - - /** Properties of a SignerInfo. */ - interface ISignerInfo { - /** SignerInfo publicKey */ - publicKey?: google.protobuf.IAny | null; - - /** SignerInfo modeInfo */ - modeInfo?: cosmos_sdk.tx.v1.IModeInfo | null; - } - - /** Represents a SignerInfo. */ - class SignerInfo implements ISignerInfo { - /** - * Constructs a new SignerInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ISignerInfo); - - /** SignerInfo publicKey. */ - public publicKey?: google.protobuf.IAny | null; - - /** SignerInfo modeInfo. */ - public modeInfo?: cosmos_sdk.tx.v1.IModeInfo | null; - - /** - * Creates a new SignerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SignerInfo instance - */ - public static create(properties?: cosmos_sdk.tx.v1.ISignerInfo): cosmos_sdk.tx.v1.SignerInfo; - - /** - * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. - * @param m SignerInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ISignerInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignerInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SignerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.SignerInfo; - } - - /** Properties of a ModeInfo. */ - interface IModeInfo { - /** ModeInfo single */ - single?: cosmos_sdk.tx.v1.ModeInfo.ISingle | null; - - /** ModeInfo multi */ - multi?: cosmos_sdk.tx.v1.ModeInfo.IMulti | null; - } - - /** Represents a ModeInfo. */ - class ModeInfo implements IModeInfo { - /** - * Constructs a new ModeInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.IModeInfo); - - /** ModeInfo single. */ - public single?: cosmos_sdk.tx.v1.ModeInfo.ISingle | null; - - /** ModeInfo multi. */ - public multi?: cosmos_sdk.tx.v1.ModeInfo.IMulti | null; - - /** ModeInfo sum. */ - public sum?: "single" | "multi"; - - /** - * Creates a new ModeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ModeInfo instance - */ - public static create(properties?: cosmos_sdk.tx.v1.IModeInfo): cosmos_sdk.tx.v1.ModeInfo; - - /** - * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. - * @param m ModeInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.IModeInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModeInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ModeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.ModeInfo; - } - - namespace ModeInfo { - /** Properties of a Single. */ - interface ISingle { - /** Single mode */ - mode?: cosmos_sdk.tx.signing.v1.SignMode | null; - } - - /** Represents a Single. */ - class Single implements ISingle { - /** - * Constructs a new Single. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ModeInfo.ISingle); - - /** Single mode. */ - public mode: cosmos_sdk.tx.signing.v1.SignMode; - - /** - * Creates a new Single instance using the specified properties. - * @param [properties] Properties to set - * @returns Single instance - */ - public static create( - properties?: cosmos_sdk.tx.v1.ModeInfo.ISingle, - ): cosmos_sdk.tx.v1.ModeInfo.Single; - - /** - * Encodes the specified Single message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. - * @param m Single message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ModeInfo.ISingle, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Single message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Single - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.tx.v1.ModeInfo.Single; - } - - /** Properties of a Multi. */ - interface IMulti { - /** Multi bitarray */ - bitarray?: cosmos_sdk.crypto.v1.ICompactBitArray | null; - - /** Multi modeInfos */ - modeInfos?: cosmos_sdk.tx.v1.IModeInfo[] | null; - } - - /** Represents a Multi. */ - class Multi implements IMulti { - /** - * Constructs a new Multi. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.ModeInfo.IMulti); - - /** Multi bitarray. */ - public bitarray?: cosmos_sdk.crypto.v1.ICompactBitArray | null; - - /** Multi modeInfos. */ - public modeInfos: cosmos_sdk.tx.v1.IModeInfo[]; - - /** - * Creates a new Multi instance using the specified properties. - * @param [properties] Properties to set - * @returns Multi instance - */ - public static create( - properties?: cosmos_sdk.tx.v1.ModeInfo.IMulti, - ): cosmos_sdk.tx.v1.ModeInfo.Multi; - - /** - * Encodes the specified Multi message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. - * @param m Multi message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.ModeInfo.IMulti, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Multi message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Multi - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.ModeInfo.Multi; - } - } - - /** Properties of a Fee. */ - interface IFee { - /** Fee amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - - /** Fee gasLimit */ - gasLimit?: number | Long | null; - } - - /** Represents a Fee. */ - class Fee implements IFee { - /** - * Constructs a new Fee. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.tx.v1.IFee); - - /** Fee amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** Fee gasLimit. */ - public gasLimit: number | Long; - - /** - * Creates a new Fee instance using the specified properties. - * @param [properties] Properties to set - * @returns Fee instance - */ - public static create(properties?: cosmos_sdk.tx.v1.IFee): cosmos_sdk.tx.v1.Fee; - - /** - * Encodes the specified Fee message. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. - * @param m Fee message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.tx.v1.IFee, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Fee message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Fee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.Fee; - } + /** Properties of a DecCoin. */ + interface IDecCoin { + /** DecCoin denom */ + denom?: string | null; + + /** DecCoin amount */ + amount?: string | null; + } + + /** Represents a DecCoin. */ + class DecCoin implements IDecCoin { + /** + * Constructs a new DecCoin. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IDecCoin); + + /** DecCoin denom. */ + public denom: string; + + /** DecCoin amount. */ + public amount: string; + + /** + * Creates a new DecCoin instance using the specified properties. + * @param [properties] Properties to set + * @returns DecCoin instance + */ + public static create(properties?: cosmos.IDecCoin): cosmos.DecCoin; + + /** + * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.DecCoin.verify|verify} messages. + * @param m DecCoin message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IDecCoin, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.DecCoin; + } + + /** Properties of an IntProto. */ + interface IIntProto { + /** IntProto int */ + int?: string | null; + } + + /** Represents an IntProto. */ + class IntProto implements IIntProto { + /** + * Constructs a new IntProto. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IIntProto); + + /** IntProto int. */ + public int: string; + + /** + * Creates a new IntProto instance using the specified properties. + * @param [properties] Properties to set + * @returns IntProto instance + */ + public static create(properties?: cosmos.IIntProto): cosmos.IntProto; + + /** + * Encodes the specified IntProto message. Does not implicitly {@link cosmos.IntProto.verify|verify} messages. + * @param m IntProto message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IIntProto, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.IntProto; + } + + /** Properties of a DecProto. */ + interface IDecProto { + /** DecProto dec */ + dec?: string | null; + } + + /** Represents a DecProto. */ + class DecProto implements IDecProto { + /** + * Constructs a new DecProto. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IDecProto); + + /** DecProto dec. */ + public dec: string; + + /** + * Creates a new DecProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DecProto instance + */ + public static create(properties?: cosmos.IDecProto): cosmos.DecProto; + + /** + * Encodes the specified DecProto message. Does not implicitly {@link cosmos.DecProto.verify|verify} messages. + * @param m DecProto message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IDecProto, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.DecProto; + } + + /** Properties of a ValAddresses. */ + interface IValAddresses { + /** ValAddresses addresses */ + addresses?: Uint8Array[] | null; + } + + /** Represents a ValAddresses. */ + class ValAddresses implements IValAddresses { + /** + * Constructs a new ValAddresses. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IValAddresses); + + /** ValAddresses addresses. */ + public addresses: Uint8Array[]; + + /** + * Creates a new ValAddresses instance using the specified properties. + * @param [properties] Properties to set + * @returns ValAddresses instance + */ + public static create(properties?: cosmos.IValAddresses): cosmos.ValAddresses; + + /** + * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos.ValAddresses.verify|verify} messages. + * @param m ValAddresses message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IValAddresses, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.ValAddresses; + } + + /** Properties of a GasInfo. */ + interface IGasInfo { + /** GasInfo gasWanted */ + gasWanted?: number | Long | null; + + /** GasInfo gasUsed */ + gasUsed?: number | Long | null; + } + + /** Represents a GasInfo. */ + class GasInfo implements IGasInfo { + /** + * Constructs a new GasInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IGasInfo); + + /** GasInfo gasWanted. */ + public gasWanted: number | Long; + + /** GasInfo gasUsed. */ + public gasUsed: number | Long; + + /** + * Creates a new GasInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GasInfo instance + */ + public static create(properties?: cosmos.IGasInfo): cosmos.GasInfo; + + /** + * Encodes the specified GasInfo message. Does not implicitly {@link cosmos.GasInfo.verify|verify} messages. + * @param m GasInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IGasInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GasInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns GasInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.GasInfo; + } + + /** Properties of a Result. */ + interface IResult { + /** Result data */ + data?: Uint8Array | null; + + /** Result log */ + log?: string | null; + + /** Result events */ + events?: tendermint.abci.types.IEvent[] | null; + } + + /** Represents a Result. */ + class Result implements IResult { + /** + * Constructs a new Result. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IResult); + + /** Result data. */ + public data: Uint8Array; + + /** Result log. */ + public log: string; + + /** Result events. */ + public events: tendermint.abci.types.IEvent[]; + + /** + * Creates a new Result instance using the specified properties. + * @param [properties] Properties to set + * @returns Result instance + */ + public static create(properties?: cosmos.IResult): cosmos.Result; + + /** + * Encodes the specified Result message. Does not implicitly {@link cosmos.Result.verify|verify} messages. + * @param m Result message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IResult, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Result message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.Result; + } + + /** Properties of a SimulationResponse. */ + interface ISimulationResponse { + /** SimulationResponse gasInfo */ + gasInfo?: cosmos.IGasInfo | null; + + /** SimulationResponse result */ + result?: cosmos.IResult | null; + } + + /** Represents a SimulationResponse. */ + class SimulationResponse implements ISimulationResponse { + /** + * Constructs a new SimulationResponse. + * @param [p] Properties to set + */ + constructor(p?: cosmos.ISimulationResponse); + + /** SimulationResponse gasInfo. */ + public gasInfo?: cosmos.IGasInfo | null; + + /** SimulationResponse result. */ + public result?: cosmos.IResult | null; + + /** + * Creates a new SimulationResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulationResponse instance + */ + public static create(properties?: cosmos.ISimulationResponse): cosmos.SimulationResponse; + + /** + * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos.SimulationResponse.verify|verify} messages. + * @param m SimulationResponse message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.ISimulationResponse, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns SimulationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.SimulationResponse; + } + + /** Properties of a MsgData. */ + interface IMsgData { + /** MsgData msgType */ + msgType?: string | null; + + /** MsgData data */ + data?: Uint8Array | null; + } + + /** Represents a MsgData. */ + class MsgData implements IMsgData { + /** + * Constructs a new MsgData. + * @param [p] Properties to set + */ + constructor(p?: cosmos.IMsgData); + + /** MsgData msgType. */ + public msgType: string; + + /** MsgData data. */ + public data: Uint8Array; + + /** + * Creates a new MsgData instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgData instance + */ + public static create(properties?: cosmos.IMsgData): cosmos.MsgData; + + /** + * Encodes the specified MsgData message. Does not implicitly {@link cosmos.MsgData.verify|verify} messages. + * @param m MsgData message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.IMsgData, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgData message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.MsgData; + } + + /** Properties of a TxData. */ + interface ITxData { + /** TxData data */ + data?: cosmos.IMsgData[] | null; + } + + /** Represents a TxData. */ + class TxData implements ITxData { + /** + * Constructs a new TxData. + * @param [p] Properties to set + */ + constructor(p?: cosmos.ITxData); + + /** TxData data. */ + public data: cosmos.IMsgData[]; + + /** + * Creates a new TxData instance using the specified properties. + * @param [properties] Properties to set + * @returns TxData instance + */ + public static create(properties?: cosmos.ITxData): cosmos.TxData; + + /** + * Encodes the specified TxData message. Does not implicitly {@link cosmos.TxData.verify|verify} messages. + * @param m TxData message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.ITxData, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TxData message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns TxData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.TxData; + } + + /** Namespace bank. */ + namespace bank { + /** Properties of a Params. */ + interface IParams { + /** Params sendEnabled */ + sendEnabled?: cosmos.bank.ISendEnabled[] | null; + + /** Params defaultSendEnabled */ + defaultSendEnabled?: boolean | null; } - /** Namespace signing. */ - namespace signing { - /** Namespace v1. */ - namespace v1 { - /** SignMode enum. */ - enum SignMode { - SIGN_MODE_UNSPECIFIED = 0, - SIGN_MODE_DIRECT = 1, - SIGN_MODE_TEXTUAL = 2, - SIGN_MODE_LEGACY_AMINO_JSON = 127, - } - } + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IParams); + + /** Params sendEnabled. */ + public sendEnabled: cosmos.bank.ISendEnabled[]; + + /** Params defaultSendEnabled. */ + public defaultSendEnabled: boolean; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos.bank.IParams): cosmos.bank.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.bank.Params.verify|verify} messages. + * @param m Params message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IParams, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.Params; + } + + /** Properties of a SendEnabled. */ + interface ISendEnabled { + /** SendEnabled denom */ + denom?: string | null; + + /** SendEnabled enabled */ + enabled?: boolean | null; + } + + /** Represents a SendEnabled. */ + class SendEnabled implements ISendEnabled { + /** + * Constructs a new SendEnabled. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.ISendEnabled); + + /** SendEnabled denom. */ + public denom: string; + + /** SendEnabled enabled. */ + public enabled: boolean; + + /** + * Creates a new SendEnabled instance using the specified properties. + * @param [properties] Properties to set + * @returns SendEnabled instance + */ + public static create(properties?: cosmos.bank.ISendEnabled): cosmos.bank.SendEnabled; + + /** + * Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.SendEnabled.verify|verify} messages. + * @param m SendEnabled message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.ISendEnabled, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SendEnabled message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns SendEnabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.SendEnabled; + } + + /** Properties of a MsgSend. */ + interface IMsgSend { + /** MsgSend fromAddress */ + fromAddress?: Uint8Array | null; + + /** MsgSend toAddress */ + toAddress?: Uint8Array | null; + + /** MsgSend amount */ + amount?: cosmos.ICoin[] | null; + } + + /** Represents a MsgSend. */ + class MsgSend implements IMsgSend { + /** + * Constructs a new MsgSend. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IMsgSend); + + /** MsgSend fromAddress. */ + public fromAddress: Uint8Array; + + /** MsgSend toAddress. */ + public toAddress: Uint8Array; + + /** MsgSend amount. */ + public amount: cosmos.ICoin[]; + + /** + * Creates a new MsgSend instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSend instance + */ + public static create(properties?: cosmos.bank.IMsgSend): cosmos.bank.MsgSend; + + /** + * Encodes the specified MsgSend message. Does not implicitly {@link cosmos.bank.MsgSend.verify|verify} messages. + * @param m MsgSend message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IMsgSend, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.MsgSend; + } + + /** Properties of an Input. */ + interface IInput { + /** Input address */ + address?: Uint8Array | null; + + /** Input coins */ + coins?: cosmos.ICoin[] | null; + } + + /** Represents an Input. */ + class Input implements IInput { + /** + * Constructs a new Input. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IInput); + + /** Input address. */ + public address: Uint8Array; + + /** Input coins. */ + public coins: cosmos.ICoin[]; + + /** + * Creates a new Input instance using the specified properties. + * @param [properties] Properties to set + * @returns Input instance + */ + public static create(properties?: cosmos.bank.IInput): cosmos.bank.Input; + + /** + * Encodes the specified Input message. Does not implicitly {@link cosmos.bank.Input.verify|verify} messages. + * @param m Input message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IInput, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Input message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.Input; + } + + /** Properties of an Output. */ + interface IOutput { + /** Output address */ + address?: Uint8Array | null; + + /** Output coins */ + coins?: cosmos.ICoin[] | null; + } + + /** Represents an Output. */ + class Output implements IOutput { + /** + * Constructs a new Output. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IOutput); + + /** Output address. */ + public address: Uint8Array; + + /** Output coins. */ + public coins: cosmos.ICoin[]; + + /** + * Creates a new Output instance using the specified properties. + * @param [properties] Properties to set + * @returns Output instance + */ + public static create(properties?: cosmos.bank.IOutput): cosmos.bank.Output; + + /** + * Encodes the specified Output message. Does not implicitly {@link cosmos.bank.Output.verify|verify} messages. + * @param m Output message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IOutput, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Output message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.Output; + } + + /** Properties of a MsgMultiSend. */ + interface IMsgMultiSend { + /** MsgMultiSend inputs */ + inputs?: cosmos.bank.IInput[] | null; + + /** MsgMultiSend outputs */ + outputs?: cosmos.bank.IOutput[] | null; + } + + /** Represents a MsgMultiSend. */ + class MsgMultiSend implements IMsgMultiSend { + /** + * Constructs a new MsgMultiSend. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.IMsgMultiSend); + + /** MsgMultiSend inputs. */ + public inputs: cosmos.bank.IInput[]; + + /** MsgMultiSend outputs. */ + public outputs: cosmos.bank.IOutput[]; + + /** + * Creates a new MsgMultiSend instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgMultiSend instance + */ + public static create(properties?: cosmos.bank.IMsgMultiSend): cosmos.bank.MsgMultiSend; + + /** + * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos.bank.MsgMultiSend.verify|verify} messages. + * @param m MsgMultiSend message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.IMsgMultiSend, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.MsgMultiSend; + } + + /** Properties of a Supply. */ + interface ISupply { + /** Supply total */ + total?: cosmos.ICoin[] | null; + } + + /** Represents a Supply. */ + class Supply implements ISupply { + /** + * Constructs a new Supply. + * @param [p] Properties to set + */ + constructor(p?: cosmos.bank.ISupply); + + /** Supply total. */ + public total: cosmos.ICoin[]; + + /** + * Creates a new Supply instance using the specified properties. + * @param [properties] Properties to set + * @returns Supply instance + */ + public static create(properties?: cosmos.bank.ISupply): cosmos.bank.Supply; + + /** + * Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.Supply.verify|verify} messages. + * @param m Supply message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.bank.ISupply, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.bank.Supply; } } /** Namespace crypto. */ namespace crypto { - /** Namespace v1. */ - namespace v1 { - /** Properties of a PublicKey. */ - interface IPublicKey { - /** PublicKey secp256k1 */ - secp256k1?: Uint8Array | null; + /** Properties of a PublicKey. */ + interface IPublicKey { + /** PublicKey secp256k1 */ + secp256k1?: Uint8Array | null; - /** PublicKey ed25519 */ - ed25519?: Uint8Array | null; + /** PublicKey ed25519 */ + ed25519?: Uint8Array | null; - /** PublicKey sr25519 */ - sr25519?: Uint8Array | null; + /** PublicKey sr25519 */ + sr25519?: Uint8Array | null; - /** PublicKey multisig */ - multisig?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold | null; + /** PublicKey multisig */ + multisig?: cosmos.crypto.IPubKeyMultisigThreshold | null; - /** PublicKey secp256r1 */ - secp256r1?: Uint8Array | null; + /** PublicKey secp256r1 */ + secp256r1?: Uint8Array | null; - /** PublicKey anyPubkey */ - anyPubkey?: google.protobuf.IAny | null; + /** PublicKey anyPubkey */ + anyPubkey?: google.protobuf.IAny | null; + } + + /** Represents a PublicKey. */ + class PublicKey implements IPublicKey { + /** + * Constructs a new PublicKey. + * @param [p] Properties to set + */ + constructor(p?: cosmos.crypto.IPublicKey); + + /** PublicKey secp256k1. */ + public secp256k1: Uint8Array; + + /** PublicKey ed25519. */ + public ed25519: Uint8Array; + + /** PublicKey sr25519. */ + public sr25519: Uint8Array; + + /** PublicKey multisig. */ + public multisig?: cosmos.crypto.IPubKeyMultisigThreshold | null; + + /** PublicKey secp256r1. */ + public secp256r1: Uint8Array; + + /** PublicKey anyPubkey. */ + public anyPubkey?: google.protobuf.IAny | null; + + /** PublicKey sum. */ + public sum?: "secp256k1" | "ed25519" | "sr25519" | "multisig" | "secp256r1" | "anyPubkey"; + + /** + * Creates a new PublicKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKey instance + */ + public static create(properties?: cosmos.crypto.IPublicKey): cosmos.crypto.PublicKey; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link cosmos.crypto.PublicKey.verify|verify} messages. + * @param m PublicKey message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.crypto.IPublicKey, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.crypto.PublicKey; + } + + /** Properties of a PubKeyMultisigThreshold. */ + interface IPubKeyMultisigThreshold { + /** PubKeyMultisigThreshold threshold */ + threshold?: number | null; + + /** PubKeyMultisigThreshold publicKeys */ + publicKeys?: cosmos.crypto.IPublicKey[] | null; + } + + /** Represents a PubKeyMultisigThreshold. */ + class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** + * Constructs a new PubKeyMultisigThreshold. + * @param [p] Properties to set + */ + constructor(p?: cosmos.crypto.IPubKeyMultisigThreshold); + + /** PubKeyMultisigThreshold threshold. */ + public threshold: number; + + /** PubKeyMultisigThreshold publicKeys. */ + public publicKeys: cosmos.crypto.IPublicKey[]; + + /** + * Creates a new PubKeyMultisigThreshold instance using the specified properties. + * @param [properties] Properties to set + * @returns PubKeyMultisigThreshold instance + */ + public static create( + properties?: cosmos.crypto.IPubKeyMultisigThreshold, + ): cosmos.crypto.PubKeyMultisigThreshold; + + /** + * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos.crypto.PubKeyMultisigThreshold.verify|verify} messages. + * @param m PubKeyMultisigThreshold message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.crypto.IPubKeyMultisigThreshold, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns PubKeyMultisigThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + r: $protobuf.Reader | Uint8Array, + l?: number, + ): cosmos.crypto.PubKeyMultisigThreshold; + } + + /** Properties of a MultiSignature. */ + interface IMultiSignature { + /** MultiSignature signatures */ + signatures?: Uint8Array[] | null; + } + + /** Represents a MultiSignature. */ + class MultiSignature implements IMultiSignature { + /** + * Constructs a new MultiSignature. + * @param [p] Properties to set + */ + constructor(p?: cosmos.crypto.IMultiSignature); + + /** MultiSignature signatures. */ + public signatures: Uint8Array[]; + + /** + * Creates a new MultiSignature instance using the specified properties. + * @param [properties] Properties to set + * @returns MultiSignature instance + */ + public static create(properties?: cosmos.crypto.IMultiSignature): cosmos.crypto.MultiSignature; + + /** + * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos.crypto.MultiSignature.verify|verify} messages. + * @param m MultiSignature message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.crypto.IMultiSignature, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.crypto.MultiSignature; + } + + /** Properties of a CompactBitArray. */ + interface ICompactBitArray { + /** CompactBitArray extraBitsStored */ + extraBitsStored?: number | null; + + /** CompactBitArray elems */ + elems?: Uint8Array | null; + } + + /** Represents a CompactBitArray. */ + class CompactBitArray implements ICompactBitArray { + /** + * Constructs a new CompactBitArray. + * @param [p] Properties to set + */ + constructor(p?: cosmos.crypto.ICompactBitArray); + + /** CompactBitArray extraBitsStored. */ + public extraBitsStored: number; + + /** CompactBitArray elems. */ + public elems: Uint8Array; + + /** + * Creates a new CompactBitArray instance using the specified properties. + * @param [properties] Properties to set + * @returns CompactBitArray instance + */ + public static create(properties?: cosmos.crypto.ICompactBitArray): cosmos.crypto.CompactBitArray; + + /** + * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos.crypto.CompactBitArray.verify|verify} messages. + * @param m CompactBitArray message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.crypto.ICompactBitArray, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.crypto.CompactBitArray; + } + } + + /** Namespace tx. */ + namespace tx { + /** Properties of a Tx. */ + interface ITx { + /** Tx body */ + body?: cosmos.tx.ITxBody | null; + + /** Tx authInfo */ + authInfo?: cosmos.tx.IAuthInfo | null; + + /** Tx signatures */ + signatures?: Uint8Array[] | null; + } + + /** Represents a Tx. */ + class Tx implements ITx { + /** + * Constructs a new Tx. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ITx); + + /** Tx body. */ + public body?: cosmos.tx.ITxBody | null; + + /** Tx authInfo. */ + public authInfo?: cosmos.tx.IAuthInfo | null; + + /** Tx signatures. */ + public signatures: Uint8Array[]; + + /** + * Creates a new Tx instance using the specified properties. + * @param [properties] Properties to set + * @returns Tx instance + */ + public static create(properties?: cosmos.tx.ITx): cosmos.tx.Tx; + + /** + * Encodes the specified Tx message. Does not implicitly {@link cosmos.tx.Tx.verify|verify} messages. + * @param m Tx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ITx, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.Tx; + } + + /** Properties of a TxRaw. */ + interface ITxRaw { + /** TxRaw bodyBytes */ + bodyBytes?: Uint8Array | null; + + /** TxRaw authInfoBytes */ + authInfoBytes?: Uint8Array | null; + + /** TxRaw signatures */ + signatures?: Uint8Array[] | null; + } + + /** Represents a TxRaw. */ + class TxRaw implements ITxRaw { + /** + * Constructs a new TxRaw. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ITxRaw); + + /** TxRaw bodyBytes. */ + public bodyBytes: Uint8Array; + + /** TxRaw authInfoBytes. */ + public authInfoBytes: Uint8Array; + + /** TxRaw signatures. */ + public signatures: Uint8Array[]; + + /** + * Creates a new TxRaw instance using the specified properties. + * @param [properties] Properties to set + * @returns TxRaw instance + */ + public static create(properties?: cosmos.tx.ITxRaw): cosmos.tx.TxRaw; + + /** + * Encodes the specified TxRaw message. Does not implicitly {@link cosmos.tx.TxRaw.verify|verify} messages. + * @param m TxRaw message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ITxRaw, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TxRaw message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns TxRaw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.TxRaw; + } + + /** Properties of a SignDoc. */ + interface ISignDoc { + /** SignDoc bodyBytes */ + bodyBytes?: Uint8Array | null; + + /** SignDoc authInfoBytes */ + authInfoBytes?: Uint8Array | null; + + /** SignDoc chainId */ + chainId?: string | null; + + /** SignDoc accountNumber */ + accountNumber?: number | Long | null; + + /** SignDoc accountSequence */ + accountSequence?: number | Long | null; + } + + /** Represents a SignDoc. */ + class SignDoc implements ISignDoc { + /** + * Constructs a new SignDoc. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ISignDoc); + + /** SignDoc bodyBytes. */ + public bodyBytes: Uint8Array; + + /** SignDoc authInfoBytes. */ + public authInfoBytes: Uint8Array; + + /** SignDoc chainId. */ + public chainId: string; + + /** SignDoc accountNumber. */ + public accountNumber: number | Long; + + /** SignDoc accountSequence. */ + public accountSequence: number | Long; + + /** + * Creates a new SignDoc instance using the specified properties. + * @param [properties] Properties to set + * @returns SignDoc instance + */ + public static create(properties?: cosmos.tx.ISignDoc): cosmos.tx.SignDoc; + + /** + * Encodes the specified SignDoc message. Does not implicitly {@link cosmos.tx.SignDoc.verify|verify} messages. + * @param m SignDoc message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ISignDoc, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SignDoc message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.SignDoc; + } + + /** Properties of a TxBody. */ + interface ITxBody { + /** TxBody messages */ + messages?: google.protobuf.IAny[] | null; + + /** TxBody memo */ + memo?: string | null; + + /** TxBody timeoutHeight */ + timeoutHeight?: number | Long | null; + + /** TxBody extensionOptions */ + extensionOptions?: google.protobuf.IAny[] | null; + + /** TxBody nonCriticalExtensionOptions */ + nonCriticalExtensionOptions?: google.protobuf.IAny[] | null; + } + + /** Represents a TxBody. */ + class TxBody implements ITxBody { + /** + * Constructs a new TxBody. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ITxBody); + + /** TxBody messages. */ + public messages: google.protobuf.IAny[]; + + /** TxBody memo. */ + public memo: string; + + /** TxBody timeoutHeight. */ + public timeoutHeight: number | Long; + + /** TxBody extensionOptions. */ + public extensionOptions: google.protobuf.IAny[]; + + /** TxBody nonCriticalExtensionOptions. */ + public nonCriticalExtensionOptions: google.protobuf.IAny[]; + + /** + * Creates a new TxBody instance using the specified properties. + * @param [properties] Properties to set + * @returns TxBody instance + */ + public static create(properties?: cosmos.tx.ITxBody): cosmos.tx.TxBody; + + /** + * Encodes the specified TxBody message. Does not implicitly {@link cosmos.tx.TxBody.verify|verify} messages. + * @param m TxBody message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ITxBody, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TxBody message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.TxBody; + } + + /** Properties of an AuthInfo. */ + interface IAuthInfo { + /** AuthInfo signerInfos */ + signerInfos?: cosmos.tx.ISignerInfo[] | null; + + /** AuthInfo fee */ + fee?: cosmos.tx.IFee | null; + } + + /** Represents an AuthInfo. */ + class AuthInfo implements IAuthInfo { + /** + * Constructs a new AuthInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.IAuthInfo); + + /** AuthInfo signerInfos. */ + public signerInfos: cosmos.tx.ISignerInfo[]; + + /** AuthInfo fee. */ + public fee?: cosmos.tx.IFee | null; + + /** + * Creates a new AuthInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AuthInfo instance + */ + public static create(properties?: cosmos.tx.IAuthInfo): cosmos.tx.AuthInfo; + + /** + * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos.tx.AuthInfo.verify|verify} messages. + * @param m AuthInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.IAuthInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.AuthInfo; + } + + /** Properties of a SignerInfo. */ + interface ISignerInfo { + /** SignerInfo publicKey */ + publicKey?: cosmos.crypto.IPublicKey | null; + + /** SignerInfo modeInfo */ + modeInfo?: cosmos.tx.IModeInfo | null; + } + + /** Represents a SignerInfo. */ + class SignerInfo implements ISignerInfo { + /** + * Constructs a new SignerInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.ISignerInfo); + + /** SignerInfo publicKey. */ + public publicKey?: cosmos.crypto.IPublicKey | null; + + /** SignerInfo modeInfo. */ + public modeInfo?: cosmos.tx.IModeInfo | null; + + /** + * Creates a new SignerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SignerInfo instance + */ + public static create(properties?: cosmos.tx.ISignerInfo): cosmos.tx.SignerInfo; + + /** + * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos.tx.SignerInfo.verify|verify} messages. + * @param m SignerInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.ISignerInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SignerInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.SignerInfo; + } + + /** Properties of a ModeInfo. */ + interface IModeInfo { + /** ModeInfo single */ + single?: cosmos.tx.ModeInfo.ISingle | null; + + /** ModeInfo multi */ + multi?: cosmos.tx.ModeInfo.IMulti | null; + } + + /** Represents a ModeInfo. */ + class ModeInfo implements IModeInfo { + /** + * Constructs a new ModeInfo. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.IModeInfo); + + /** ModeInfo single. */ + public single?: cosmos.tx.ModeInfo.ISingle | null; + + /** ModeInfo multi. */ + public multi?: cosmos.tx.ModeInfo.IMulti | null; + + /** ModeInfo sum. */ + public sum?: "single" | "multi"; + + /** + * Creates a new ModeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ModeInfo instance + */ + public static create(properties?: cosmos.tx.IModeInfo): cosmos.tx.ModeInfo; + + /** + * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos.tx.ModeInfo.verify|verify} messages. + * @param m ModeInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.IModeInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModeInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.ModeInfo; + } + + namespace ModeInfo { + /** Properties of a Single. */ + interface ISingle { + /** Single mode */ + mode?: cosmos.tx.signing.SignMode | null; } - /** Represents a PublicKey. */ - class PublicKey implements IPublicKey { + /** Represents a Single. */ + class Single implements ISingle { /** - * Constructs a new PublicKey. + * Constructs a new Single. * @param [p] Properties to set */ - constructor(p?: cosmos_sdk.crypto.v1.IPublicKey); + constructor(p?: cosmos.tx.ModeInfo.ISingle); - /** PublicKey secp256k1. */ - public secp256k1: Uint8Array; - - /** PublicKey ed25519. */ - public ed25519: Uint8Array; - - /** PublicKey sr25519. */ - public sr25519: Uint8Array; - - /** PublicKey multisig. */ - public multisig?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold | null; - - /** PublicKey secp256r1. */ - public secp256r1: Uint8Array; - - /** PublicKey anyPubkey. */ - public anyPubkey?: google.protobuf.IAny | null; - - /** PublicKey sum. */ - public sum?: "secp256k1" | "ed25519" | "sr25519" | "multisig" | "secp256r1" | "anyPubkey"; + /** Single mode. */ + public mode: cosmos.tx.signing.SignMode; /** - * Creates a new PublicKey instance using the specified properties. + * Creates a new Single instance using the specified properties. * @param [properties] Properties to set - * @returns PublicKey instance + * @returns Single instance */ - public static create(properties?: cosmos_sdk.crypto.v1.IPublicKey): cosmos_sdk.crypto.v1.PublicKey; + public static create(properties?: cosmos.tx.ModeInfo.ISingle): cosmos.tx.ModeInfo.Single; /** - * Encodes the specified PublicKey message. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @param m PublicKey message or plain object to encode + * Encodes the specified Single message. Does not implicitly {@link cosmos.tx.ModeInfo.Single.verify|verify} messages. + * @param m Single message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode(m: cosmos_sdk.crypto.v1.IPublicKey, w?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos.tx.ModeInfo.ISingle, w?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PublicKey message from the specified reader or buffer. + * Decodes a Single message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns PublicKey + * @returns Single * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.crypto.v1.PublicKey; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.ModeInfo.Single; } - /** Properties of a PubKeyMultisigThreshold. */ - interface IPubKeyMultisigThreshold { - /** PubKeyMultisigThreshold threshold */ - threshold?: number | null; + /** Properties of a Multi. */ + interface IMulti { + /** Multi bitarray */ + bitarray?: cosmos.crypto.ICompactBitArray | null; - /** PubKeyMultisigThreshold publicKeys */ - publicKeys?: cosmos_sdk.crypto.v1.IPublicKey[] | null; + /** Multi modeInfos */ + modeInfos?: cosmos.tx.IModeInfo[] | null; } - /** Represents a PubKeyMultisigThreshold. */ - class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** Represents a Multi. */ + class Multi implements IMulti { /** - * Constructs a new PubKeyMultisigThreshold. + * Constructs a new Multi. * @param [p] Properties to set */ - constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + constructor(p?: cosmos.tx.ModeInfo.IMulti); - /** PubKeyMultisigThreshold threshold. */ - public threshold: number; + /** Multi bitarray. */ + public bitarray?: cosmos.crypto.ICompactBitArray | null; - /** PubKeyMultisigThreshold publicKeys. */ - public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; + /** Multi modeInfos. */ + public modeInfos: cosmos.tx.IModeInfo[]; /** - * Creates a new PubKeyMultisigThreshold instance using the specified properties. + * Creates a new Multi instance using the specified properties. * @param [properties] Properties to set - * @returns PubKeyMultisigThreshold instance + * @returns Multi instance */ - public static create( - properties?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, - ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + public static create(properties?: cosmos.tx.ModeInfo.IMulti): cosmos.tx.ModeInfo.Multi; /** - * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @param m PubKeyMultisigThreshold message or plain object to encode + * Encodes the specified Multi message. Does not implicitly {@link cosmos.tx.ModeInfo.Multi.verify|verify} messages. + * @param m Multi message or plain object to encode * @param [w] Writer to encode to * @returns Writer */ - public static encode( - m: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, - w?: $protobuf.Writer, - ): $protobuf.Writer; + public static encode(m: cosmos.tx.ModeInfo.IMulti, w?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. + * Decodes a Multi message from the specified reader or buffer. * @param r Reader or buffer to decode from * @param [l] Message length if known beforehand - * @returns PubKeyMultisigThreshold + * @returns Multi * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.ModeInfo.Multi; } + } - /** Properties of a MultiSignature. */ - interface IMultiSignature { - /** MultiSignature signatures */ - signatures?: Uint8Array[] | null; - } + /** Properties of a Fee. */ + interface IFee { + /** Fee amount */ + amount?: cosmos.ICoin[] | null; - /** Represents a MultiSignature. */ - class MultiSignature implements IMultiSignature { - /** - * Constructs a new MultiSignature. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.IMultiSignature); + /** Fee gasLimit */ + gasLimit?: number | Long | null; + } - /** MultiSignature signatures. */ - public signatures: Uint8Array[]; + /** Represents a Fee. */ + class Fee implements IFee { + /** + * Constructs a new Fee. + * @param [p] Properties to set + */ + constructor(p?: cosmos.tx.IFee); - /** - * Creates a new MultiSignature instance using the specified properties. - * @param [properties] Properties to set - * @returns MultiSignature instance - */ - public static create( - properties?: cosmos_sdk.crypto.v1.IMultiSignature, - ): cosmos_sdk.crypto.v1.MultiSignature; + /** Fee amount. */ + public amount: cosmos.ICoin[]; - /** - * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @param m MultiSignature message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.crypto.v1.IMultiSignature, w?: $protobuf.Writer): $protobuf.Writer; + /** Fee gasLimit. */ + public gasLimit: number | Long; - /** - * Decodes a MultiSignature message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MultiSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.crypto.v1.MultiSignature; - } + /** + * Creates a new Fee instance using the specified properties. + * @param [properties] Properties to set + * @returns Fee instance + */ + public static create(properties?: cosmos.tx.IFee): cosmos.tx.Fee; - /** Properties of a CompactBitArray. */ - interface ICompactBitArray { - /** CompactBitArray extraBitsStored */ - extraBitsStored?: number | null; + /** + * Encodes the specified Fee message. Does not implicitly {@link cosmos.tx.Fee.verify|verify} messages. + * @param m Fee message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos.tx.IFee, w?: $protobuf.Writer): $protobuf.Writer; - /** CompactBitArray elems */ - elems?: Uint8Array | null; - } + /** + * Decodes a Fee message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos.tx.Fee; + } - /** Represents a CompactBitArray. */ - class CompactBitArray implements ICompactBitArray { - /** - * Constructs a new CompactBitArray. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.ICompactBitArray); - - /** CompactBitArray extraBitsStored. */ - public extraBitsStored: number; - - /** CompactBitArray elems. */ - public elems: Uint8Array; - - /** - * Creates a new CompactBitArray instance using the specified properties. - * @param [properties] Properties to set - * @returns CompactBitArray instance - */ - public static create( - properties?: cosmos_sdk.crypto.v1.ICompactBitArray, - ): cosmos_sdk.crypto.v1.CompactBitArray; - - /** - * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @param m CompactBitArray message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode( - m: cosmos_sdk.crypto.v1.ICompactBitArray, - w?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CompactBitArray message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns CompactBitArray - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - r: $protobuf.Reader | Uint8Array, - l?: number, - ): cosmos_sdk.crypto.v1.CompactBitArray; + /** Namespace signing. */ + namespace signing { + /** SignMode enum. */ + enum SignMode { + SIGN_MODE_UNSPECIFIED = 0, + SIGN_MODE_DIRECT = 1, + SIGN_MODE_TEXTUAL = 2, + SIGN_MODE_LEGACY_AMINO_JSON = 127, } } } diff --git a/packages/proto-signing/types/registry.d.ts b/packages/proto-signing/types/registry.d.ts index 777661b803..db41d2e133 100644 --- a/packages/proto-signing/types/registry.d.ts +++ b/packages/proto-signing/types/registry.d.ts @@ -1,5 +1,5 @@ import protobuf from "protobufjs"; -import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; +import { cosmos, google } from "./generated/codecimpl"; export interface GeneratedType { readonly create: (properties?: { [k: string]: any }) => any; readonly encode: ( @@ -36,5 +36,5 @@ export declare class Registry { encode({ typeUrl, value }: EncodeObject): Uint8Array; encodeTxBody(txBodyFields: TxBodyValue): Uint8Array; decode({ typeUrl, value }: DecodeObject): any; - decodeTxBody(txBody: Uint8Array): cosmosSdk.tx.v1.TxBody; + decodeTxBody(txBody: Uint8Array): cosmos.tx.TxBody; }