diff --git a/.eslintignore b/.eslintignore index 6942c0df..1fe9188b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,4 +6,5 @@ dist/ docs/ examples/ generated/ +proto/ types/ diff --git a/packages/demo-protobuf/.eslintignore b/packages/demo-protobuf/.eslintignore new file mode 120000 index 00000000..86039baf --- /dev/null +++ b/packages/demo-protobuf/.eslintignore @@ -0,0 +1 @@ +../../.eslintignore \ No newline at end of file diff --git a/packages/demo-protobuf/.gitignore b/packages/demo-protobuf/.gitignore new file mode 100644 index 00000000..1f68d6fa --- /dev/null +++ b/packages/demo-protobuf/.gitignore @@ -0,0 +1,4 @@ +build/ +dist/ +docs/ +proto/ diff --git a/packages/demo-protobuf/README.md b/packages/demo-protobuf/README.md new file mode 100644 index 00000000..4e07407e --- /dev/null +++ b/packages/demo-protobuf/README.md @@ -0,0 +1,10 @@ +# @cosmjs/demo-protobuf + +Demo package for protobufs with Cosmos SDK. + +## License + +This package is part of the cosmjs repository, licensed under the Apache +License 2.0 (see +[NOTICE](https://github.com/CosmWasm/cosmjs/blob/master/NOTICE) and +[LICENSE](https://github.com/CosmWasm/cosmjs/blob/master/LICENSE)). diff --git a/packages/demo-protobuf/jasmine-testrunner.js b/packages/demo-protobuf/jasmine-testrunner.js new file mode 100755 index 00000000..9fada59b --- /dev/null +++ b/packages/demo-protobuf/jasmine-testrunner.js @@ -0,0 +1,26 @@ +#!/usr/bin/env node + +require("source-map-support").install(); +const defaultSpecReporterConfig = require("../../jasmine-spec-reporter.config.json"); + +// setup Jasmine +const Jasmine = require("jasmine"); +const jasmine = new Jasmine(); +jasmine.loadConfig({ + spec_dir: "build", + spec_files: ["**/*.spec.js"], + helpers: [], + random: false, + seed: null, + stopSpecOnExpectationFailure: false, +}); +jasmine.jasmine.DEFAULT_TIMEOUT_INTERVAL = 15 * 1000; + +// setup reporter +const { SpecReporter } = require("jasmine-spec-reporter"); +const reporter = new SpecReporter({ ...defaultSpecReporterConfig }); + +// initialize and execute +jasmine.env.clearReporters(); +jasmine.addReporter(reporter); +jasmine.execute(); diff --git a/packages/demo-protobuf/karma.conf.js b/packages/demo-protobuf/karma.conf.js new file mode 100644 index 00000000..006da5fe --- /dev/null +++ b/packages/demo-protobuf/karma.conf.js @@ -0,0 +1,47 @@ +module.exports = function (config) { + config.set({ + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: ".", + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ["jasmine"], + + // list of files / patterns to load in the browser + files: ["dist/web/tests.js"], + + client: { + jasmine: { + random: false, + timeoutInterval: 15000, + }, + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ["progress", "kjhtml"], + + // web server port + port: 9876, + + // enable / disable colors in the output (reporters and logs) + colors: true, + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: false, + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ["Firefox"], + + browserNoActivityTimeout: 90000, + + // Keep brower open for debugging. This is overridden by yarn scripts + singleRun: false, + }); +}; diff --git a/packages/demo-protobuf/nonces/README.txt b/packages/demo-protobuf/nonces/README.txt new file mode 100644 index 00000000..092fe732 --- /dev/null +++ b/packages/demo-protobuf/nonces/README.txt @@ -0,0 +1 @@ +Directory used to trigger lerna package updates for all packages diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json new file mode 100644 index 00000000..b1736fb0 --- /dev/null +++ b/packages/demo-protobuf/package.json @@ -0,0 +1,46 @@ +{ + "name": "@cosmjs/demo-protobuf", + "private": true, + "version": "0.20.0", + "description": "Utilities for Cosmos SDK 0.38", + "author": "Ethan Frey ", + "license": "Apache-2.0", + "main": "build/index.js", + "types": "types/index.d.ts", + "files": [ + "build/", + "types/", + "*.md", + "!*.spec.*", + "!**/testdata/" + ], + "repository": { + "type": "git", + "url": "https://github.com/CosmWasm/cosmjs/tree/master/packages/demo-protobuf" + }, + "scripts": { + "docs": "shx rm -rf docs && typedoc --options typedoc.js", + "format": "prettier --write --loglevel warn \"./src/**/*.ts\"", + "lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"", + "lint-fix": "eslint --max-warnings 0 \"**/*.{js,ts}\" --fix", + "move-types": "shx rm -rf ./types/* && shx mv build/types/* ./types && rm -rf ./types/testdata && shx rm -f ./types/*.spec.d.ts", + "format-types": "prettier --write --loglevel warn \"./types/**/*.d.ts\"", + "build": "shx rm -rf ./build && tsc && shx mkdir -p build/generated && shx cp ./src/generated/*.js ./build/generated && shx mkdir -p ./build/types/generated && shx cp ./src/generated/*.d.ts ./build/types/generated && yarn move-types && yarn format-types", + "build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build", + "test-node": "node jasmine-testrunner.js", + "test-firefox": "yarn pack-web && karma start --single-run --browsers Firefox", + "test-chrome": "yarn pack-web && karma start --single-run --browsers ChromeHeadless", + "test": "yarn build-or-skip && yarn test-node", + "pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js", + "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}", + "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.*\"" + }, + "dependencies": { + "protobufjs": "~6.9.0" + }, + "devDependencies": { + "@cosmjs/utils": "^0.20.0" + } +} diff --git a/packages/demo-protobuf/scripts/get-proto.sh b/packages/demo-protobuf/scripts/get-proto.sh new file mode 100755 index 00000000..00766542 --- /dev/null +++ b/packages/demo-protobuf/scripts/get-proto.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck > /dev/null && shellcheck "$0" + +PROTO_DIR="./proto" +COSMOS_DIR="$PROTO_DIR/cosmos" +COSMOS_SDK_DIR="$COSMOS_DIR/cosmos-sdk" +ZIP_FILE="$COSMOS_DIR/tmp.zip" +REF=${REF:-"master"} +SUFFIX=${REF} + +[[ $SUFFIX =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && SUFFIX=${SUFFIX#v} + +mkdir -p "$COSMOS_DIR" + +wget -qO "$ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$REF.zip" \ + && unzip "$ZIP_FILE" "*.proto" -d "$COSMOS_DIR" \ + && mv "$COSMOS_SDK_DIR-$SUFFIX" "$COSMOS_SDK_DIR" \ + && rm "$ZIP_FILE" diff --git a/packages/demo-protobuf/src/decorator.spec.ts b/packages/demo-protobuf/src/decorator.spec.ts new file mode 100644 index 00000000..36f7a1b6 --- /dev/null +++ b/packages/demo-protobuf/src/decorator.spec.ts @@ -0,0 +1,95 @@ +/* eslint-disable @typescript-eslint/camelcase */ +import { assert } from "@cosmjs/utils"; +import { Message } from "protobufjs"; + +import { CosmosField, CosmosMessage } from "./decorator"; +import { Registry } from "./registry"; + +describe("decorator demo", () => { + it("works with a custom msg", () => { + const nestedTypeUrl = "/demo.MsgNestedDemo"; + const typeUrl = "/demo.MsgDemo"; + const myRegistry = new Registry(); + + @CosmosMessage(myRegistry, nestedTypeUrl) + class MsgNestedDemo extends Message<{}> { + @CosmosField.String(1) + public readonly foo?: string; + } + + @CosmosMessage(myRegistry, typeUrl) + // eslint-disable-next-line @typescript-eslint/no-unused-vars + class MsgDemo extends Message<{}> { + @CosmosField.Boolean(1) + public readonly booleanDemo?: boolean; + + @CosmosField.String(2) + public readonly stringDemo?: string; + + @CosmosField.Bytes(3) + public readonly bytesDemo?: Uint8Array; + + @CosmosField.Int64(4) + public readonly int64Demo?: number; + + @CosmosField.Uint64(5) + public readonly uint64Demo?: number; + + @CosmosField.RepeatedString(6) + public readonly listDemo?: readonly string[]; + + @CosmosField.Nested(7, MsgNestedDemo) + public readonly nestedDemo?: MsgNestedDemo; + } + + const MsgNestedDemoT = myRegistry.lookupType(nestedTypeUrl)!; + const MsgDemoT = myRegistry.lookupType(typeUrl)!; + const TxBody = myRegistry.lookupType("/cosmos.tx.TxBody")!; + const Any = myRegistry.lookupType("/google.protobuf.Any")!; + + const msgNestedDemoFields = { + foo: "bar", + }; + const msgNestedDemo = MsgNestedDemoT.create(msgNestedDemoFields); + + const msgDemoFields = { + booleanDemo: true, + stringDemo: "example text", + bytesDemo: Uint8Array.from([1, 2, 3, 4, 5, 6, 7, 8]), + int64Demo: -123, + uint64Demo: 123, + listDemo: ["this", "is", "a", "list"], + nestedDemo: msgNestedDemo, + }; + const msgDemo = MsgDemoT.create(msgDemoFields); + const msgDemoBytes = MsgDemoT.encode(msgDemo).finish(); + const msgDemoWrapped = Any.create({ + type_url: typeUrl, + value: msgDemoBytes, + }); + const txBody = TxBody.create({ + messages: [msgDemoWrapped], + memo: "Some memo", + timeoutHeight: 9999, + extensionOptions: [], + }); + const txBodyBytes = TxBody.encode(txBody).finish(); + + const txBodyDecoded = TxBody.decode(txBodyBytes); + const msg = txBodyDecoded.messages[0]; + assert(msg.type_url); + assert(msg.value); + + const msgDemoDecoded = MsgDemoT.decode(msg.value); + expect(msgDemoDecoded.booleanDemo).toEqual(msgDemoFields.booleanDemo); + expect(msgDemoDecoded.stringDemo).toEqual(msgDemoFields.stringDemo); + // bytesDemo decodes to a Buffer in Node + expect(Uint8Array.from(msgDemoDecoded.bytesDemo)).toEqual(msgDemoFields.bytesDemo); + // int64Demo and uint64Demo decode to Long in Node + expect(Number(msgDemoDecoded.int64Demo)).toEqual(msgDemoFields.int64Demo); + expect(Number(msgDemoDecoded.uint64Demo)).toEqual(msgDemoFields.uint64Demo); + + expect(msgDemoDecoded.listDemo).toEqual(msgDemoFields.listDemo); + expect(msgDemoDecoded.nestedDemo).toEqual(msgDemoFields.nestedDemo); + }); +}); diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts new file mode 100644 index 00000000..11748e41 --- /dev/null +++ b/packages/demo-protobuf/src/decorator.ts @@ -0,0 +1,29 @@ +import { Constructor, Field, Message, TypeDecorator, util } from "protobufjs"; + +import { Registry } from "./registry"; + +function getTypeName(typeUrl: string): string { + const parts = typeUrl.split("."); + return parts[parts.length - 1]; +} + +export function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator { + return (ctor: Constructor>) => { + const typeName = getTypeName(typeUrl); + const generatedType = util.decorateType(ctor, typeName); + registry.register(typeUrl, generatedType); + }; +} + +export const CosmosField = { + Boolean: (id: number) => Field.d(id, "bool"), + + String: (id: number) => Field.d(id, "string"), + Bytes: (id: number) => Field.d(id, "bytes"), + + Int64: (id: number) => Field.d(id, "int64"), + Uint64: (id: number) => Field.d(id, "uint64"), + + RepeatedString: (id: number) => Field.d(id, "string", "repeated"), + Nested: (id: number, ctor: Constructor>) => Field.d(id, ctor), +}; diff --git a/packages/demo-protobuf/src/demo.json b/packages/demo-protobuf/src/demo.json new file mode 100644 index 00000000..b9b01c24 --- /dev/null +++ b/packages/demo-protobuf/src/demo.json @@ -0,0 +1,12 @@ +{ + "nested": { + "MsgDemo": { + "fields": { + "example": { + "type": "string", + "id": 1 + } + } + } + } +} diff --git a/packages/demo-protobuf/src/demo.proto.ts b/packages/demo-protobuf/src/demo.proto.ts new file mode 100644 index 00000000..a0050a05 --- /dev/null +++ b/packages/demo-protobuf/src/demo.proto.ts @@ -0,0 +1,12 @@ +// Without this TS infers this is a string literal. +// eslint-disable-next-line @typescript-eslint/no-inferrable-types +const proto: string = ` +syntax = "proto3"; +package demo; + +message MsgDemo { + string example = 1; +} +`; + +export default proto; diff --git a/packages/demo-protobuf/src/demo.spec.ts b/packages/demo-protobuf/src/demo.spec.ts new file mode 100644 index 00000000..32a0e51f --- /dev/null +++ b/packages/demo-protobuf/src/demo.spec.ts @@ -0,0 +1,151 @@ +/* eslint-disable @typescript-eslint/camelcase */ +import { assert } from "@cosmjs/utils"; +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"; + +type MsgDemo = { + readonly example: string; +}; + +const { Coin } = cosmosSdk.v1; +const { TxBody } = cosmosSdk.tx.v1; +const { MsgSend } = cosmosSdk.x.bank.v1; +const { Any } = google.protobuf; + +function getTypeName(typeUrl: string): string { + const parts = typeUrl.split("."); + return parts[parts.length - 1]; +} + +describe("protobuf demo", () => { + it("works with generated static code", () => { + const coin = Coin.create({ + denom: "ucosm", + amount: "1234567890", + }); + const msgSend = MsgSend.create({ + fromAddress: Uint8Array.from(Array.from({ length: 20 }, () => 1)), + toAddress: Uint8Array.from(Array.from({ length: 20 }, () => 2)), + amount: [coin], + }); + const msgSendBytes = MsgSend.encode(msgSend).finish(); + const msgSendWrapped = Any.create({ + type_url: "/cosmos.bank.MsgSend", + value: msgSendBytes, + }); + const txBody = TxBody.create({ + messages: [msgSendWrapped], + memo: "Some memo", + timeoutHeight: 9999, + extensionOptions: [], + }); + const txBodyBytes = TxBody.encode(txBody).finish(); + + // Deserialization + const txBodyDecoded = TxBody.decode(txBodyBytes); + const msg = txBodyDecoded.messages[0]; + assert(msg.value); + const msgSendDecoded = MsgSend.decode(msg.value); + + // fromAddress and toAddress are now Buffers + expect(Uint8Array.from(msgSendDecoded.fromAddress)).toEqual(msgSend.fromAddress); + expect(Uint8Array.from(msgSendDecoded.toAddress)).toEqual(msgSend.toAddress); + expect(msgSendDecoded.amount).toEqual(msgSend.amount); + }); + + it("works with dynamically loaded proto files", () => { + const { root } = protobuf.parse(demoProto); + const typeUrl = "/demo.MsgDemo"; + const encoder = root.lookupType(getTypeName(typeUrl)); + const msgDemo = (encoder.create({ + example: "Some example text", + }) as unknown) as MsgDemo; + const msgDemoBytes = encoder.encode(msgDemo).finish(); + const msgDemoWrapped = Any.create({ + type_url: typeUrl, + value: msgDemoBytes, + }); + const txBody = TxBody.create({ + messages: [msgDemoWrapped], + memo: "Some memo", + timeoutHeight: 9999, + extensionOptions: [], + }); + const txBodyBytes = TxBody.encode(txBody).finish(); + + // Deserialization + const txBodyDecoded = TxBody.decode(txBodyBytes); + const msg = txBodyDecoded.messages[0]; + assert(msg.type_url); + assert(msg.value); + + const decoder = root.lookupType(getTypeName(msg.type_url)); + const msgDemoDecoded = (decoder.decode(msg.value) as unknown) as MsgDemo; + expect(msgDemoDecoded.example).toEqual(msgDemo.example); + }); + + it("works with dynamically loaded json files", () => { + const root = protobuf.Root.fromJSON(demoJson); + const typeUrl = "/demo.MsgDemo"; + const encoder = root.lookupType(getTypeName(typeUrl)); + const msgDemo = (encoder.create({ + example: "Some example text", + }) as unknown) as MsgDemo; + const msgDemoBytes = encoder.encode(msgDemo).finish(); + const msgDemoWrapped = Any.create({ + type_url: typeUrl, + value: msgDemoBytes, + }); + const txBody = TxBody.create({ + messages: [msgDemoWrapped], + memo: "Some memo", + timeoutHeight: 9999, + extensionOptions: [], + }); + const txBodyBytes = TxBody.encode(txBody).finish(); + + // Deserialization + const txBodyDecoded = TxBody.decode(txBodyBytes); + const msg = txBodyDecoded.messages[0]; + assert(msg.type_url); + assert(msg.value); + + const decoder = root.lookupType(getTypeName(msg.type_url)); + const msgDemoDecoded = (decoder.decode(msg.value) as unknown) as MsgDemo; + expect(msgDemoDecoded.example).toEqual(msgDemo.example); + }); + + it("works with reflection", () => { + const typeUrl = "/demo.MsgDemo"; + const encoder = reflectionRoot.lookupType(getTypeName(typeUrl)); + const msgDemo = (encoder.create({ + example: "Some example text", + }) as unknown) as MsgDemo; + const msgDemoBytes = encoder.encode(msgDemo).finish(); + const msgDemoWrapped = Any.create({ + type_url: typeUrl, + value: msgDemoBytes, + }); + const txBody = TxBody.create({ + messages: [msgDemoWrapped], + memo: "Some memo", + timeoutHeight: 9999, + extensionOptions: [], + }); + const txBodyBytes = TxBody.encode(txBody).finish(); + + // Deserialization + const txBodyDecoded = TxBody.decode(txBodyBytes); + const msg = txBodyDecoded.messages[0]; + assert(msg.type_url); + assert(msg.value); + + const decoder = reflectionRoot.lookupType(getTypeName(msg.type_url)); + const msgDemoDecoded = (decoder.decode(msg.value) as unknown) as MsgDemo; + expect(msgDemoDecoded.example).toEqual(msgDemo.example); + }); +}); diff --git a/packages/demo-protobuf/src/demo.ts b/packages/demo-protobuf/src/demo.ts new file mode 100644 index 00000000..09baa378 --- /dev/null +++ b/packages/demo-protobuf/src/demo.ts @@ -0,0 +1,7 @@ +import { Field, Root, Type } from "protobufjs"; + +export const MsgDemo = new Type("MsgDemo").add(new Field("example", 1, "string")); + +const root = new Root().define("demo").add(MsgDemo); + +export default root; diff --git a/packages/demo-protobuf/src/generated/codecimpl.d.ts b/packages/demo-protobuf/src/generated/codecimpl.d.ts new file mode 100644 index 00000000..8ae30088 --- /dev/null +++ b/packages/demo-protobuf/src/generated/codecimpl.d.ts @@ -0,0 +1,4699 @@ +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; + + /** 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; + } + } + } + } + + /** 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; + } + } + + /** 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; + } + } + + /** 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, + } + } + } + } + + /** Namespace crypto. */ + namespace crypto { + /** Namespace v1. */ + namespace v1 { + /** Properties of a PublicKey. */ + interface IPublicKey { + /** PublicKey secp256k1 */ + secp256k1?: Uint8Array | null; + + /** PublicKey ed25519 */ + ed25519?: Uint8Array | null; + + /** PublicKey sr25519 */ + sr25519?: Uint8Array | null; + + /** PublicKey multisig */ + multisig?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold | null; + + /** PublicKey secp256r1 */ + secp256r1?: Uint8Array | 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_sdk.crypto.v1.IPublicKey); + + /** 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"; + + /** + * Creates a new PublicKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKey instance + */ + public static create(properties?: cosmos_sdk.crypto.v1.IPublicKey): cosmos_sdk.crypto.v1.PublicKey; + + /** + * 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 + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos_sdk.crypto.v1.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_sdk.crypto.v1.PublicKey; + } + + /** Properties of a PubKeyMultisigThreshold. */ + interface IPubKeyMultisigThreshold { + /** PubKeyMultisigThreshold threshold */ + threshold?: number | null; + + /** PubKeyMultisigThreshold publicKeys */ + publicKeys?: cosmos_sdk.crypto.v1.IPublicKey[] | null; + } + + /** Represents a PubKeyMultisigThreshold. */ + class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** + * Constructs a new PubKeyMultisigThreshold. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + + /** PubKeyMultisigThreshold threshold. */ + public threshold: number; + + /** PubKeyMultisigThreshold publicKeys. */ + public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; + + /** + * Creates a new PubKeyMultisigThreshold instance using the specified properties. + * @param [properties] Properties to set + * @returns PubKeyMultisigThreshold instance + */ + public static create( + properties?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, + ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + + /** + * 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 + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos_sdk.crypto.v1.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_sdk.crypto.v1.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_sdk.crypto.v1.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_sdk.crypto.v1.IMultiSignature, + ): cosmos_sdk.crypto.v1.MultiSignature; + + /** + * 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; + + /** + * 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; + } + + /** 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_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 tendermint. */ +export namespace tendermint { + /** Namespace abci. */ + namespace abci { + /** Namespace types. */ + namespace types { + /** Properties of a Request. */ + interface IRequest { + /** Request echo */ + echo?: tendermint.abci.types.IRequestEcho | null; + + /** Request flush */ + flush?: tendermint.abci.types.IRequestFlush | null; + + /** Request info */ + info?: tendermint.abci.types.IRequestInfo | null; + + /** Request setOption */ + setOption?: tendermint.abci.types.IRequestSetOption | null; + + /** Request initChain */ + initChain?: tendermint.abci.types.IRequestInitChain | null; + + /** Request query */ + query?: tendermint.abci.types.IRequestQuery | null; + + /** Request beginBlock */ + beginBlock?: tendermint.abci.types.IRequestBeginBlock | null; + + /** Request checkTx */ + checkTx?: tendermint.abci.types.IRequestCheckTx | null; + + /** Request deliverTx */ + deliverTx?: tendermint.abci.types.IRequestDeliverTx | null; + + /** Request endBlock */ + endBlock?: tendermint.abci.types.IRequestEndBlock | null; + + /** Request commit */ + commit?: tendermint.abci.types.IRequestCommit | null; + } + + /** Represents a Request. */ + class Request implements IRequest { + /** + * Constructs a new Request. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequest); + + /** Request echo. */ + public echo?: tendermint.abci.types.IRequestEcho | null; + + /** Request flush. */ + public flush?: tendermint.abci.types.IRequestFlush | null; + + /** Request info. */ + public info?: tendermint.abci.types.IRequestInfo | null; + + /** Request setOption. */ + public setOption?: tendermint.abci.types.IRequestSetOption | null; + + /** Request initChain. */ + public initChain?: tendermint.abci.types.IRequestInitChain | null; + + /** Request query. */ + public query?: tendermint.abci.types.IRequestQuery | null; + + /** Request beginBlock. */ + public beginBlock?: tendermint.abci.types.IRequestBeginBlock | null; + + /** Request checkTx. */ + public checkTx?: tendermint.abci.types.IRequestCheckTx | null; + + /** Request deliverTx. */ + public deliverTx?: tendermint.abci.types.IRequestDeliverTx | null; + + /** Request endBlock. */ + public endBlock?: tendermint.abci.types.IRequestEndBlock | null; + + /** Request commit. */ + public commit?: tendermint.abci.types.IRequestCommit | null; + + /** Request value. */ + public value?: + | "echo" + | "flush" + | "info" + | "setOption" + | "initChain" + | "query" + | "beginBlock" + | "checkTx" + | "deliverTx" + | "endBlock" + | "commit"; + + /** + * Creates a new Request instance using the specified properties. + * @param [properties] Properties to set + * @returns Request instance + */ + public static create(properties?: tendermint.abci.types.IRequest): tendermint.abci.types.Request; + + /** + * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. + * @param m Request message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequest, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Request message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Request + * @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): tendermint.abci.types.Request; + } + + /** Properties of a RequestEcho. */ + interface IRequestEcho { + /** RequestEcho message */ + message?: string | null; + } + + /** Represents a RequestEcho. */ + class RequestEcho implements IRequestEcho { + /** + * Constructs a new RequestEcho. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestEcho); + + /** RequestEcho message. */ + public message: string; + + /** + * Creates a new RequestEcho instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestEcho instance + */ + public static create( + properties?: tendermint.abci.types.IRequestEcho, + ): tendermint.abci.types.RequestEcho; + + /** + * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. + * @param m RequestEcho message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestEcho, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestEcho message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestEcho + * @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): tendermint.abci.types.RequestEcho; + } + + /** Properties of a RequestFlush. */ + interface IRequestFlush {} + + /** Represents a RequestFlush. */ + class RequestFlush implements IRequestFlush { + /** + * Constructs a new RequestFlush. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestFlush); + + /** + * Creates a new RequestFlush instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestFlush instance + */ + public static create( + properties?: tendermint.abci.types.IRequestFlush, + ): tendermint.abci.types.RequestFlush; + + /** + * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. + * @param m RequestFlush message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestFlush, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestFlush message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestFlush + * @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, + ): tendermint.abci.types.RequestFlush; + } + + /** Properties of a RequestInfo. */ + interface IRequestInfo { + /** RequestInfo version */ + version?: string | null; + + /** RequestInfo blockVersion */ + blockVersion?: number | Long | null; + + /** RequestInfo p2pVersion */ + p2pVersion?: number | Long | null; + } + + /** Represents a RequestInfo. */ + class RequestInfo implements IRequestInfo { + /** + * Constructs a new RequestInfo. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestInfo); + + /** RequestInfo version. */ + public version: string; + + /** RequestInfo blockVersion. */ + public blockVersion: number | Long; + + /** RequestInfo p2pVersion. */ + public p2pVersion: number | Long; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestInfo instance + */ + public static create( + properties?: tendermint.abci.types.IRequestInfo, + ): tendermint.abci.types.RequestInfo; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. + * @param m RequestInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestInfo + * @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): tendermint.abci.types.RequestInfo; + } + + /** Properties of a RequestSetOption. */ + interface IRequestSetOption { + /** RequestSetOption key */ + key?: string | null; + + /** RequestSetOption value */ + value?: string | null; + } + + /** Represents a RequestSetOption. */ + class RequestSetOption implements IRequestSetOption { + /** + * Constructs a new RequestSetOption. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestSetOption); + + /** RequestSetOption key. */ + public key: string; + + /** RequestSetOption value. */ + public value: string; + + /** + * Creates a new RequestSetOption instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestSetOption instance + */ + public static create( + properties?: tendermint.abci.types.IRequestSetOption, + ): tendermint.abci.types.RequestSetOption; + + /** + * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. + * @param m RequestSetOption message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestSetOption, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestSetOption + * @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, + ): tendermint.abci.types.RequestSetOption; + } + + /** Properties of a RequestInitChain. */ + interface IRequestInitChain { + /** RequestInitChain time */ + time?: google.protobuf.ITimestamp | null; + + /** RequestInitChain chainId */ + chainId?: string | null; + + /** RequestInitChain consensusParams */ + consensusParams?: tendermint.abci.types.IConsensusParams | null; + + /** RequestInitChain validators */ + validators?: tendermint.abci.types.IValidatorUpdate[] | null; + + /** RequestInitChain appStateBytes */ + appStateBytes?: Uint8Array | null; + } + + /** Represents a RequestInitChain. */ + class RequestInitChain implements IRequestInitChain { + /** + * Constructs a new RequestInitChain. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestInitChain); + + /** RequestInitChain time. */ + public time?: google.protobuf.ITimestamp | null; + + /** RequestInitChain chainId. */ + public chainId: string; + + /** RequestInitChain consensusParams. */ + public consensusParams?: tendermint.abci.types.IConsensusParams | null; + + /** RequestInitChain validators. */ + public validators: tendermint.abci.types.IValidatorUpdate[]; + + /** RequestInitChain appStateBytes. */ + public appStateBytes: Uint8Array; + + /** + * Creates a new RequestInitChain instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestInitChain instance + */ + public static create( + properties?: tendermint.abci.types.IRequestInitChain, + ): tendermint.abci.types.RequestInitChain; + + /** + * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. + * @param m RequestInitChain message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestInitChain, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestInitChain + * @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, + ): tendermint.abci.types.RequestInitChain; + } + + /** Properties of a RequestQuery. */ + interface IRequestQuery { + /** RequestQuery data */ + data?: Uint8Array | null; + + /** RequestQuery path */ + path?: string | null; + + /** RequestQuery height */ + height?: number | Long | null; + + /** RequestQuery prove */ + prove?: boolean | null; + } + + /** Represents a RequestQuery. */ + class RequestQuery implements IRequestQuery { + /** + * Constructs a new RequestQuery. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestQuery); + + /** RequestQuery data. */ + public data: Uint8Array; + + /** RequestQuery path. */ + public path: string; + + /** RequestQuery height. */ + public height: number | Long; + + /** RequestQuery prove. */ + public prove: boolean; + + /** + * Creates a new RequestQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestQuery instance + */ + public static create( + properties?: tendermint.abci.types.IRequestQuery, + ): tendermint.abci.types.RequestQuery; + + /** + * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. + * @param m RequestQuery message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestQuery, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestQuery message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestQuery + * @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, + ): tendermint.abci.types.RequestQuery; + } + + /** Properties of a RequestBeginBlock. */ + interface IRequestBeginBlock { + /** RequestBeginBlock hash */ + hash?: Uint8Array | null; + + /** RequestBeginBlock header */ + header?: tendermint.abci.types.IHeader | null; + + /** RequestBeginBlock lastCommitInfo */ + lastCommitInfo?: tendermint.abci.types.ILastCommitInfo | null; + + /** RequestBeginBlock byzantineValidators */ + byzantineValidators?: tendermint.abci.types.IEvidence[] | null; + } + + /** Represents a RequestBeginBlock. */ + class RequestBeginBlock implements IRequestBeginBlock { + /** + * Constructs a new RequestBeginBlock. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestBeginBlock); + + /** RequestBeginBlock hash. */ + public hash: Uint8Array; + + /** RequestBeginBlock header. */ + public header?: tendermint.abci.types.IHeader | null; + + /** RequestBeginBlock lastCommitInfo. */ + public lastCommitInfo?: tendermint.abci.types.ILastCommitInfo | null; + + /** RequestBeginBlock byzantineValidators. */ + public byzantineValidators: tendermint.abci.types.IEvidence[]; + + /** + * Creates a new RequestBeginBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestBeginBlock instance + */ + public static create( + properties?: tendermint.abci.types.IRequestBeginBlock, + ): tendermint.abci.types.RequestBeginBlock; + + /** + * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. + * @param m RequestBeginBlock message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestBeginBlock, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestBeginBlock + * @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, + ): tendermint.abci.types.RequestBeginBlock; + } + + /** CheckTxType enum. */ + enum CheckTxType { + New = 0, + Recheck = 1, + } + + /** Properties of a RequestCheckTx. */ + interface IRequestCheckTx { + /** RequestCheckTx tx */ + tx?: Uint8Array | null; + + /** RequestCheckTx type */ + type?: tendermint.abci.types.CheckTxType | null; + } + + /** Represents a RequestCheckTx. */ + class RequestCheckTx implements IRequestCheckTx { + /** + * Constructs a new RequestCheckTx. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestCheckTx); + + /** RequestCheckTx tx. */ + public tx: Uint8Array; + + /** RequestCheckTx type. */ + public type: tendermint.abci.types.CheckTxType; + + /** + * Creates a new RequestCheckTx instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestCheckTx instance + */ + public static create( + properties?: tendermint.abci.types.IRequestCheckTx, + ): tendermint.abci.types.RequestCheckTx; + + /** + * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. + * @param m RequestCheckTx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestCheckTx, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestCheckTx + * @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, + ): tendermint.abci.types.RequestCheckTx; + } + + /** Properties of a RequestDeliverTx. */ + interface IRequestDeliverTx { + /** RequestDeliverTx tx */ + tx?: Uint8Array | null; + } + + /** Represents a RequestDeliverTx. */ + class RequestDeliverTx implements IRequestDeliverTx { + /** + * Constructs a new RequestDeliverTx. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestDeliverTx); + + /** RequestDeliverTx tx. */ + public tx: Uint8Array; + + /** + * Creates a new RequestDeliverTx instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestDeliverTx instance + */ + public static create( + properties?: tendermint.abci.types.IRequestDeliverTx, + ): tendermint.abci.types.RequestDeliverTx; + + /** + * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. + * @param m RequestDeliverTx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestDeliverTx, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestDeliverTx + * @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, + ): tendermint.abci.types.RequestDeliverTx; + } + + /** Properties of a RequestEndBlock. */ + interface IRequestEndBlock { + /** RequestEndBlock height */ + height?: number | Long | null; + } + + /** Represents a RequestEndBlock. */ + class RequestEndBlock implements IRequestEndBlock { + /** + * Constructs a new RequestEndBlock. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestEndBlock); + + /** RequestEndBlock height. */ + public height: number | Long; + + /** + * Creates a new RequestEndBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestEndBlock instance + */ + public static create( + properties?: tendermint.abci.types.IRequestEndBlock, + ): tendermint.abci.types.RequestEndBlock; + + /** + * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. + * @param m RequestEndBlock message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestEndBlock, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestEndBlock + * @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, + ): tendermint.abci.types.RequestEndBlock; + } + + /** Properties of a RequestCommit. */ + interface IRequestCommit {} + + /** Represents a RequestCommit. */ + class RequestCommit implements IRequestCommit { + /** + * Constructs a new RequestCommit. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestCommit); + + /** + * Creates a new RequestCommit instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestCommit instance + */ + public static create( + properties?: tendermint.abci.types.IRequestCommit, + ): tendermint.abci.types.RequestCommit; + + /** + * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. + * @param m RequestCommit message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestCommit, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestCommit message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestCommit + * @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, + ): tendermint.abci.types.RequestCommit; + } + + /** Properties of a Response. */ + interface IResponse { + /** Response exception */ + exception?: tendermint.abci.types.IResponseException | null; + + /** Response echo */ + echo?: tendermint.abci.types.IResponseEcho | null; + + /** Response flush */ + flush?: tendermint.abci.types.IResponseFlush | null; + + /** Response info */ + info?: tendermint.abci.types.IResponseInfo | null; + + /** Response setOption */ + setOption?: tendermint.abci.types.IResponseSetOption | null; + + /** Response initChain */ + initChain?: tendermint.abci.types.IResponseInitChain | null; + + /** Response query */ + query?: tendermint.abci.types.IResponseQuery | null; + + /** Response beginBlock */ + beginBlock?: tendermint.abci.types.IResponseBeginBlock | null; + + /** Response checkTx */ + checkTx?: tendermint.abci.types.IResponseCheckTx | null; + + /** Response deliverTx */ + deliverTx?: tendermint.abci.types.IResponseDeliverTx | null; + + /** Response endBlock */ + endBlock?: tendermint.abci.types.IResponseEndBlock | null; + + /** Response commit */ + commit?: tendermint.abci.types.IResponseCommit | null; + } + + /** Represents a Response. */ + class Response implements IResponse { + /** + * Constructs a new Response. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponse); + + /** Response exception. */ + public exception?: tendermint.abci.types.IResponseException | null; + + /** Response echo. */ + public echo?: tendermint.abci.types.IResponseEcho | null; + + /** Response flush. */ + public flush?: tendermint.abci.types.IResponseFlush | null; + + /** Response info. */ + public info?: tendermint.abci.types.IResponseInfo | null; + + /** Response setOption. */ + public setOption?: tendermint.abci.types.IResponseSetOption | null; + + /** Response initChain. */ + public initChain?: tendermint.abci.types.IResponseInitChain | null; + + /** Response query. */ + public query?: tendermint.abci.types.IResponseQuery | null; + + /** Response beginBlock. */ + public beginBlock?: tendermint.abci.types.IResponseBeginBlock | null; + + /** Response checkTx. */ + public checkTx?: tendermint.abci.types.IResponseCheckTx | null; + + /** Response deliverTx. */ + public deliverTx?: tendermint.abci.types.IResponseDeliverTx | null; + + /** Response endBlock. */ + public endBlock?: tendermint.abci.types.IResponseEndBlock | null; + + /** Response commit. */ + public commit?: tendermint.abci.types.IResponseCommit | null; + + /** Response value. */ + public value?: + | "exception" + | "echo" + | "flush" + | "info" + | "setOption" + | "initChain" + | "query" + | "beginBlock" + | "checkTx" + | "deliverTx" + | "endBlock" + | "commit"; + + /** + * Creates a new Response instance using the specified properties. + * @param [properties] Properties to set + * @returns Response instance + */ + public static create(properties?: tendermint.abci.types.IResponse): tendermint.abci.types.Response; + + /** + * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. + * @param m Response message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponse, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Response message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Response + * @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): tendermint.abci.types.Response; + } + + /** Properties of a ResponseException. */ + interface IResponseException { + /** ResponseException error */ + error?: string | null; + } + + /** Represents a ResponseException. */ + class ResponseException implements IResponseException { + /** + * Constructs a new ResponseException. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseException); + + /** ResponseException error. */ + public error: string; + + /** + * Creates a new ResponseException instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseException instance + */ + public static create( + properties?: tendermint.abci.types.IResponseException, + ): tendermint.abci.types.ResponseException; + + /** + * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. + * @param m ResponseException message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseException, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseException message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseException + * @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, + ): tendermint.abci.types.ResponseException; + } + + /** Properties of a ResponseEcho. */ + interface IResponseEcho { + /** ResponseEcho message */ + message?: string | null; + } + + /** Represents a ResponseEcho. */ + class ResponseEcho implements IResponseEcho { + /** + * Constructs a new ResponseEcho. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseEcho); + + /** ResponseEcho message. */ + public message: string; + + /** + * Creates a new ResponseEcho instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseEcho instance + */ + public static create( + properties?: tendermint.abci.types.IResponseEcho, + ): tendermint.abci.types.ResponseEcho; + + /** + * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. + * @param m ResponseEcho message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponseEcho, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseEcho + * @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, + ): tendermint.abci.types.ResponseEcho; + } + + /** Properties of a ResponseFlush. */ + interface IResponseFlush {} + + /** Represents a ResponseFlush. */ + class ResponseFlush implements IResponseFlush { + /** + * Constructs a new ResponseFlush. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseFlush); + + /** + * Creates a new ResponseFlush instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseFlush instance + */ + public static create( + properties?: tendermint.abci.types.IResponseFlush, + ): tendermint.abci.types.ResponseFlush; + + /** + * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. + * @param m ResponseFlush message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponseFlush, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseFlush + * @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, + ): tendermint.abci.types.ResponseFlush; + } + + /** Properties of a ResponseInfo. */ + interface IResponseInfo { + /** ResponseInfo data */ + data?: string | null; + + /** ResponseInfo version */ + version?: string | null; + + /** ResponseInfo appVersion */ + appVersion?: number | Long | null; + + /** ResponseInfo lastBlockHeight */ + lastBlockHeight?: number | Long | null; + + /** ResponseInfo lastBlockAppHash */ + lastBlockAppHash?: Uint8Array | null; + } + + /** Represents a ResponseInfo. */ + class ResponseInfo implements IResponseInfo { + /** + * Constructs a new ResponseInfo. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseInfo); + + /** ResponseInfo data. */ + public data: string; + + /** ResponseInfo version. */ + public version: string; + + /** ResponseInfo appVersion. */ + public appVersion: number | Long; + + /** ResponseInfo lastBlockHeight. */ + public lastBlockHeight: number | Long; + + /** ResponseInfo lastBlockAppHash. */ + public lastBlockAppHash: Uint8Array; + + /** + * Creates a new ResponseInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseInfo instance + */ + public static create( + properties?: tendermint.abci.types.IResponseInfo, + ): tendermint.abci.types.ResponseInfo; + + /** + * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. + * @param m ResponseInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponseInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseInfo + * @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, + ): tendermint.abci.types.ResponseInfo; + } + + /** Properties of a ResponseSetOption. */ + interface IResponseSetOption { + /** ResponseSetOption code */ + code?: number | null; + + /** ResponseSetOption log */ + log?: string | null; + + /** ResponseSetOption info */ + info?: string | null; + } + + /** Represents a ResponseSetOption. */ + class ResponseSetOption implements IResponseSetOption { + /** + * Constructs a new ResponseSetOption. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseSetOption); + + /** ResponseSetOption code. */ + public code: number; + + /** ResponseSetOption log. */ + public log: string; + + /** ResponseSetOption info. */ + public info: string; + + /** + * Creates a new ResponseSetOption instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseSetOption instance + */ + public static create( + properties?: tendermint.abci.types.IResponseSetOption, + ): tendermint.abci.types.ResponseSetOption; + + /** + * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. + * @param m ResponseSetOption message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseSetOption, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseSetOption + * @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, + ): tendermint.abci.types.ResponseSetOption; + } + + /** Properties of a ResponseInitChain. */ + interface IResponseInitChain { + /** ResponseInitChain consensusParams */ + consensusParams?: tendermint.abci.types.IConsensusParams | null; + + /** ResponseInitChain validators */ + validators?: tendermint.abci.types.IValidatorUpdate[] | null; + } + + /** Represents a ResponseInitChain. */ + class ResponseInitChain implements IResponseInitChain { + /** + * Constructs a new ResponseInitChain. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseInitChain); + + /** ResponseInitChain consensusParams. */ + public consensusParams?: tendermint.abci.types.IConsensusParams | null; + + /** ResponseInitChain validators. */ + public validators: tendermint.abci.types.IValidatorUpdate[]; + + /** + * Creates a new ResponseInitChain instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseInitChain instance + */ + public static create( + properties?: tendermint.abci.types.IResponseInitChain, + ): tendermint.abci.types.ResponseInitChain; + + /** + * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. + * @param m ResponseInitChain message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseInitChain, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseInitChain + * @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, + ): tendermint.abci.types.ResponseInitChain; + } + + /** Properties of a ResponseQuery. */ + interface IResponseQuery { + /** ResponseQuery code */ + code?: number | null; + + /** ResponseQuery log */ + log?: string | null; + + /** ResponseQuery info */ + info?: string | null; + + /** ResponseQuery index */ + index?: number | Long | null; + + /** ResponseQuery key */ + key?: Uint8Array | null; + + /** ResponseQuery value */ + value?: Uint8Array | null; + + /** ResponseQuery proof */ + proof?: tendermint.crypto.merkle.IProof | null; + + /** ResponseQuery height */ + height?: number | Long | null; + + /** ResponseQuery codespace */ + codespace?: string | null; + } + + /** Represents a ResponseQuery. */ + class ResponseQuery implements IResponseQuery { + /** + * Constructs a new ResponseQuery. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseQuery); + + /** ResponseQuery code. */ + public code: number; + + /** ResponseQuery log. */ + public log: string; + + /** ResponseQuery info. */ + public info: string; + + /** ResponseQuery index. */ + public index: number | Long; + + /** ResponseQuery key. */ + public key: Uint8Array; + + /** ResponseQuery value. */ + public value: Uint8Array; + + /** ResponseQuery proof. */ + public proof?: tendermint.crypto.merkle.IProof | null; + + /** ResponseQuery height. */ + public height: number | Long; + + /** ResponseQuery codespace. */ + public codespace: string; + + /** + * Creates a new ResponseQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseQuery instance + */ + public static create( + properties?: tendermint.abci.types.IResponseQuery, + ): tendermint.abci.types.ResponseQuery; + + /** + * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. + * @param m ResponseQuery message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponseQuery, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseQuery + * @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, + ): tendermint.abci.types.ResponseQuery; + } + + /** Properties of a ResponseBeginBlock. */ + interface IResponseBeginBlock { + /** ResponseBeginBlock events */ + events?: tendermint.abci.types.IEvent[] | null; + } + + /** Represents a ResponseBeginBlock. */ + class ResponseBeginBlock implements IResponseBeginBlock { + /** + * Constructs a new ResponseBeginBlock. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseBeginBlock); + + /** ResponseBeginBlock events. */ + public events: tendermint.abci.types.IEvent[]; + + /** + * Creates a new ResponseBeginBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseBeginBlock instance + */ + public static create( + properties?: tendermint.abci.types.IResponseBeginBlock, + ): tendermint.abci.types.ResponseBeginBlock; + + /** + * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. + * @param m ResponseBeginBlock message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseBeginBlock, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseBeginBlock + * @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, + ): tendermint.abci.types.ResponseBeginBlock; + } + + /** Properties of a ResponseCheckTx. */ + interface IResponseCheckTx { + /** ResponseCheckTx code */ + code?: number | null; + + /** ResponseCheckTx data */ + data?: Uint8Array | null; + + /** ResponseCheckTx log */ + log?: string | null; + + /** ResponseCheckTx info */ + info?: string | null; + + /** ResponseCheckTx gasWanted */ + gasWanted?: number | Long | null; + + /** ResponseCheckTx gasUsed */ + gasUsed?: number | Long | null; + + /** ResponseCheckTx events */ + events?: tendermint.abci.types.IEvent[] | null; + + /** ResponseCheckTx codespace */ + codespace?: string | null; + } + + /** Represents a ResponseCheckTx. */ + class ResponseCheckTx implements IResponseCheckTx { + /** + * Constructs a new ResponseCheckTx. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseCheckTx); + + /** ResponseCheckTx code. */ + public code: number; + + /** ResponseCheckTx data. */ + public data: Uint8Array; + + /** ResponseCheckTx log. */ + public log: string; + + /** ResponseCheckTx info. */ + public info: string; + + /** ResponseCheckTx gasWanted. */ + public gasWanted: number | Long; + + /** ResponseCheckTx gasUsed. */ + public gasUsed: number | Long; + + /** ResponseCheckTx events. */ + public events: tendermint.abci.types.IEvent[]; + + /** ResponseCheckTx codespace. */ + public codespace: string; + + /** + * Creates a new ResponseCheckTx instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseCheckTx instance + */ + public static create( + properties?: tendermint.abci.types.IResponseCheckTx, + ): tendermint.abci.types.ResponseCheckTx; + + /** + * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. + * @param m ResponseCheckTx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseCheckTx, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseCheckTx + * @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, + ): tendermint.abci.types.ResponseCheckTx; + } + + /** Properties of a ResponseDeliverTx. */ + interface IResponseDeliverTx { + /** ResponseDeliverTx code */ + code?: number | null; + + /** ResponseDeliverTx data */ + data?: Uint8Array | null; + + /** ResponseDeliverTx log */ + log?: string | null; + + /** ResponseDeliverTx info */ + info?: string | null; + + /** ResponseDeliverTx gasWanted */ + gasWanted?: number | Long | null; + + /** ResponseDeliverTx gasUsed */ + gasUsed?: number | Long | null; + + /** ResponseDeliverTx events */ + events?: tendermint.abci.types.IEvent[] | null; + + /** ResponseDeliverTx codespace */ + codespace?: string | null; + } + + /** Represents a ResponseDeliverTx. */ + class ResponseDeliverTx implements IResponseDeliverTx { + /** + * Constructs a new ResponseDeliverTx. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseDeliverTx); + + /** ResponseDeliverTx code. */ + public code: number; + + /** ResponseDeliverTx data. */ + public data: Uint8Array; + + /** ResponseDeliverTx log. */ + public log: string; + + /** ResponseDeliverTx info. */ + public info: string; + + /** ResponseDeliverTx gasWanted. */ + public gasWanted: number | Long; + + /** ResponseDeliverTx gasUsed. */ + public gasUsed: number | Long; + + /** ResponseDeliverTx events. */ + public events: tendermint.abci.types.IEvent[]; + + /** ResponseDeliverTx codespace. */ + public codespace: string; + + /** + * Creates a new ResponseDeliverTx instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseDeliverTx instance + */ + public static create( + properties?: tendermint.abci.types.IResponseDeliverTx, + ): tendermint.abci.types.ResponseDeliverTx; + + /** + * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. + * @param m ResponseDeliverTx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseDeliverTx, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseDeliverTx + * @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, + ): tendermint.abci.types.ResponseDeliverTx; + } + + /** Properties of a ResponseEndBlock. */ + interface IResponseEndBlock { + /** ResponseEndBlock validatorUpdates */ + validatorUpdates?: tendermint.abci.types.IValidatorUpdate[] | null; + + /** ResponseEndBlock consensusParamUpdates */ + consensusParamUpdates?: tendermint.abci.types.IConsensusParams | null; + + /** ResponseEndBlock events */ + events?: tendermint.abci.types.IEvent[] | null; + } + + /** Represents a ResponseEndBlock. */ + class ResponseEndBlock implements IResponseEndBlock { + /** + * Constructs a new ResponseEndBlock. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseEndBlock); + + /** ResponseEndBlock validatorUpdates. */ + public validatorUpdates: tendermint.abci.types.IValidatorUpdate[]; + + /** ResponseEndBlock consensusParamUpdates. */ + public consensusParamUpdates?: tendermint.abci.types.IConsensusParams | null; + + /** ResponseEndBlock events. */ + public events: tendermint.abci.types.IEvent[]; + + /** + * Creates a new ResponseEndBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseEndBlock instance + */ + public static create( + properties?: tendermint.abci.types.IResponseEndBlock, + ): tendermint.abci.types.ResponseEndBlock; + + /** + * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. + * @param m ResponseEndBlock message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseEndBlock, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseEndBlock + * @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, + ): tendermint.abci.types.ResponseEndBlock; + } + + /** Properties of a ResponseCommit. */ + interface IResponseCommit { + /** ResponseCommit data */ + data?: Uint8Array | null; + } + + /** Represents a ResponseCommit. */ + class ResponseCommit implements IResponseCommit { + /** + * Constructs a new ResponseCommit. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseCommit); + + /** ResponseCommit data. */ + public data: Uint8Array; + + /** + * Creates a new ResponseCommit instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseCommit instance + */ + public static create( + properties?: tendermint.abci.types.IResponseCommit, + ): tendermint.abci.types.ResponseCommit; + + /** + * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. + * @param m ResponseCommit message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseCommit, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseCommit + * @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, + ): tendermint.abci.types.ResponseCommit; + } + + /** Properties of a ConsensusParams. */ + interface IConsensusParams { + /** ConsensusParams block */ + block?: tendermint.abci.types.IBlockParams | null; + + /** ConsensusParams evidence */ + evidence?: tendermint.abci.types.IEvidenceParams | null; + + /** ConsensusParams validator */ + validator?: tendermint.abci.types.IValidatorParams | null; + } + + /** Represents a ConsensusParams. */ + class ConsensusParams implements IConsensusParams { + /** + * Constructs a new ConsensusParams. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IConsensusParams); + + /** ConsensusParams block. */ + public block?: tendermint.abci.types.IBlockParams | null; + + /** ConsensusParams evidence. */ + public evidence?: tendermint.abci.types.IEvidenceParams | null; + + /** ConsensusParams validator. */ + public validator?: tendermint.abci.types.IValidatorParams | null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsensusParams instance + */ + public static create( + properties?: tendermint.abci.types.IConsensusParams, + ): tendermint.abci.types.ConsensusParams; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. + * @param m ConsensusParams message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IConsensusParams, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ConsensusParams + * @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, + ): tendermint.abci.types.ConsensusParams; + } + + /** Properties of a BlockParams. */ + interface IBlockParams { + /** BlockParams maxBytes */ + maxBytes?: number | Long | null; + + /** BlockParams maxGas */ + maxGas?: number | Long | null; + } + + /** Represents a BlockParams. */ + class BlockParams implements IBlockParams { + /** + * Constructs a new BlockParams. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IBlockParams); + + /** BlockParams maxBytes. */ + public maxBytes: number | Long; + + /** BlockParams maxGas. */ + public maxGas: number | Long; + + /** + * Creates a new BlockParams instance using the specified properties. + * @param [properties] Properties to set + * @returns BlockParams instance + */ + public static create( + properties?: tendermint.abci.types.IBlockParams, + ): tendermint.abci.types.BlockParams; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. + * @param m BlockParams message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IBlockParams, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns BlockParams + * @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): tendermint.abci.types.BlockParams; + } + + /** Properties of an EvidenceParams. */ + interface IEvidenceParams { + /** EvidenceParams maxAgeNumBlocks */ + maxAgeNumBlocks?: number | Long | null; + + /** EvidenceParams maxAgeDuration */ + maxAgeDuration?: google.protobuf.IDuration | null; + } + + /** Represents an EvidenceParams. */ + class EvidenceParams implements IEvidenceParams { + /** + * Constructs a new EvidenceParams. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IEvidenceParams); + + /** EvidenceParams maxAgeNumBlocks. */ + public maxAgeNumBlocks: number | Long; + + /** EvidenceParams maxAgeDuration. */ + public maxAgeDuration?: google.protobuf.IDuration | null; + + /** + * Creates a new EvidenceParams instance using the specified properties. + * @param [properties] Properties to set + * @returns EvidenceParams instance + */ + public static create( + properties?: tendermint.abci.types.IEvidenceParams, + ): tendermint.abci.types.EvidenceParams; + + /** + * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. + * @param m EvidenceParams message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IEvidenceParams, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns EvidenceParams + * @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, + ): tendermint.abci.types.EvidenceParams; + } + + /** Properties of a ValidatorParams. */ + interface IValidatorParams { + /** ValidatorParams pubKeyTypes */ + pubKeyTypes?: string[] | null; + } + + /** Represents a ValidatorParams. */ + class ValidatorParams implements IValidatorParams { + /** + * Constructs a new ValidatorParams. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IValidatorParams); + + /** ValidatorParams pubKeyTypes. */ + public pubKeyTypes: string[]; + + /** + * Creates a new ValidatorParams instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorParams instance + */ + public static create( + properties?: tendermint.abci.types.IValidatorParams, + ): tendermint.abci.types.ValidatorParams; + + /** + * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. + * @param m ValidatorParams message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IValidatorParams, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorParams + * @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, + ): tendermint.abci.types.ValidatorParams; + } + + /** Properties of a LastCommitInfo. */ + interface ILastCommitInfo { + /** LastCommitInfo round */ + round?: number | null; + + /** LastCommitInfo votes */ + votes?: tendermint.abci.types.IVoteInfo[] | null; + } + + /** Represents a LastCommitInfo. */ + class LastCommitInfo implements ILastCommitInfo { + /** + * Constructs a new LastCommitInfo. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.ILastCommitInfo); + + /** LastCommitInfo round. */ + public round: number; + + /** LastCommitInfo votes. */ + public votes: tendermint.abci.types.IVoteInfo[]; + + /** + * Creates a new LastCommitInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LastCommitInfo instance + */ + public static create( + properties?: tendermint.abci.types.ILastCommitInfo, + ): tendermint.abci.types.LastCommitInfo; + + /** + * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. + * @param m LastCommitInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.ILastCommitInfo, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns LastCommitInfo + * @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, + ): tendermint.abci.types.LastCommitInfo; + } + + /** Properties of an Event. */ + interface IEvent { + /** Event type */ + type?: string | null; + + /** Event attributes */ + attributes?: tendermint.libs.kv.IPair[] | null; + } + + /** Represents an Event. */ + class Event implements IEvent { + /** + * Constructs a new Event. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IEvent); + + /** Event type. */ + public type: string; + + /** Event attributes. */ + public attributes: tendermint.libs.kv.IPair[]; + + /** + * Creates a new Event instance using the specified properties. + * @param [properties] Properties to set + * @returns Event instance + */ + public static create(properties?: tendermint.abci.types.IEvent): tendermint.abci.types.Event; + + /** + * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. + * @param m Event message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IEvent, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Event message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Event + * @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): tendermint.abci.types.Event; + } + + /** Properties of a Header. */ + interface IHeader { + /** Header version */ + version?: tendermint.abci.types.IVersion | null; + + /** Header chainId */ + chainId?: string | null; + + /** Header height */ + height?: number | Long | null; + + /** Header time */ + time?: google.protobuf.ITimestamp | null; + + /** Header lastBlockId */ + lastBlockId?: tendermint.abci.types.IBlockID | null; + + /** Header lastCommitHash */ + lastCommitHash?: Uint8Array | null; + + /** Header dataHash */ + dataHash?: Uint8Array | null; + + /** Header validatorsHash */ + validatorsHash?: Uint8Array | null; + + /** Header nextValidatorsHash */ + nextValidatorsHash?: Uint8Array | null; + + /** Header consensusHash */ + consensusHash?: Uint8Array | null; + + /** Header appHash */ + appHash?: Uint8Array | null; + + /** Header lastResultsHash */ + lastResultsHash?: Uint8Array | null; + + /** Header evidenceHash */ + evidenceHash?: Uint8Array | null; + + /** Header proposerAddress */ + proposerAddress?: Uint8Array | null; + } + + /** Represents a Header. */ + class Header implements IHeader { + /** + * Constructs a new Header. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IHeader); + + /** Header version. */ + public version?: tendermint.abci.types.IVersion | null; + + /** Header chainId. */ + public chainId: string; + + /** Header height. */ + public height: number | Long; + + /** Header time. */ + public time?: google.protobuf.ITimestamp | null; + + /** Header lastBlockId. */ + public lastBlockId?: tendermint.abci.types.IBlockID | null; + + /** Header lastCommitHash. */ + public lastCommitHash: Uint8Array; + + /** Header dataHash. */ + public dataHash: Uint8Array; + + /** Header validatorsHash. */ + public validatorsHash: Uint8Array; + + /** Header nextValidatorsHash. */ + public nextValidatorsHash: Uint8Array; + + /** Header consensusHash. */ + public consensusHash: Uint8Array; + + /** Header appHash. */ + public appHash: Uint8Array; + + /** Header lastResultsHash. */ + public lastResultsHash: Uint8Array; + + /** Header evidenceHash. */ + public evidenceHash: Uint8Array; + + /** Header proposerAddress. */ + public proposerAddress: Uint8Array; + + /** + * Creates a new Header instance using the specified properties. + * @param [properties] Properties to set + * @returns Header instance + */ + public static create(properties?: tendermint.abci.types.IHeader): tendermint.abci.types.Header; + + /** + * Encodes the specified Header message. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. + * @param m Header message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IHeader, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Header message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Header + * @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): tendermint.abci.types.Header; + } + + /** Properties of a Version. */ + interface IVersion { + /** Version Block */ + Block?: number | Long | null; + + /** Version App */ + App?: number | Long | null; + } + + /** Represents a Version. */ + class Version implements IVersion { + /** + * Constructs a new Version. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IVersion); + + /** Version Block. */ + public Block: number | Long; + + /** Version App. */ + public App: number | Long; + + /** + * Creates a new Version instance using the specified properties. + * @param [properties] Properties to set + * @returns Version instance + */ + public static create(properties?: tendermint.abci.types.IVersion): tendermint.abci.types.Version; + + /** + * Encodes the specified Version message. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. + * @param m Version message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IVersion, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Version message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Version + * @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): tendermint.abci.types.Version; + } + + /** Properties of a BlockID. */ + interface IBlockID { + /** BlockID hash */ + hash?: Uint8Array | null; + + /** BlockID partsHeader */ + partsHeader?: tendermint.abci.types.IPartSetHeader | null; + } + + /** Represents a BlockID. */ + class BlockID implements IBlockID { + /** + * Constructs a new BlockID. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IBlockID); + + /** BlockID hash. */ + public hash: Uint8Array; + + /** BlockID partsHeader. */ + public partsHeader?: tendermint.abci.types.IPartSetHeader | null; + + /** + * Creates a new BlockID instance using the specified properties. + * @param [properties] Properties to set + * @returns BlockID instance + */ + public static create(properties?: tendermint.abci.types.IBlockID): tendermint.abci.types.BlockID; + + /** + * Encodes the specified BlockID message. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. + * @param m BlockID message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IBlockID, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlockID message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns BlockID + * @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): tendermint.abci.types.BlockID; + } + + /** Properties of a PartSetHeader. */ + interface IPartSetHeader { + /** PartSetHeader total */ + total?: number | null; + + /** PartSetHeader hash */ + hash?: Uint8Array | null; + } + + /** Represents a PartSetHeader. */ + class PartSetHeader implements IPartSetHeader { + /** + * Constructs a new PartSetHeader. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IPartSetHeader); + + /** PartSetHeader total. */ + public total: number; + + /** PartSetHeader hash. */ + public hash: Uint8Array; + + /** + * Creates a new PartSetHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns PartSetHeader instance + */ + public static create( + properties?: tendermint.abci.types.IPartSetHeader, + ): tendermint.abci.types.PartSetHeader; + + /** + * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. + * @param m PartSetHeader message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IPartSetHeader, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns PartSetHeader + * @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, + ): tendermint.abci.types.PartSetHeader; + } + + /** Properties of a Validator. */ + interface IValidator { + /** Validator address */ + address?: Uint8Array | null; + + /** Validator power */ + power?: number | Long | null; + } + + /** Represents a Validator. */ + class Validator implements IValidator { + /** + * Constructs a new Validator. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IValidator); + + /** Validator address. */ + public address: Uint8Array; + + /** Validator power. */ + public power: number | Long; + + /** + * Creates a new Validator instance using the specified properties. + * @param [properties] Properties to set + * @returns Validator instance + */ + public static create(properties?: tendermint.abci.types.IValidator): tendermint.abci.types.Validator; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. + * @param m Validator message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IValidator, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Validator + * @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): tendermint.abci.types.Validator; + } + + /** Properties of a ValidatorUpdate. */ + interface IValidatorUpdate { + /** ValidatorUpdate pubKey */ + pubKey?: tendermint.abci.types.IPubKey | null; + + /** ValidatorUpdate power */ + power?: number | Long | null; + } + + /** Represents a ValidatorUpdate. */ + class ValidatorUpdate implements IValidatorUpdate { + /** + * Constructs a new ValidatorUpdate. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IValidatorUpdate); + + /** ValidatorUpdate pubKey. */ + public pubKey?: tendermint.abci.types.IPubKey | null; + + /** ValidatorUpdate power. */ + public power: number | Long; + + /** + * Creates a new ValidatorUpdate instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorUpdate instance + */ + public static create( + properties?: tendermint.abci.types.IValidatorUpdate, + ): tendermint.abci.types.ValidatorUpdate; + + /** + * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. + * @param m ValidatorUpdate message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IValidatorUpdate, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorUpdate + * @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, + ): tendermint.abci.types.ValidatorUpdate; + } + + /** Properties of a VoteInfo. */ + interface IVoteInfo { + /** VoteInfo validator */ + validator?: tendermint.abci.types.IValidator | null; + + /** VoteInfo signedLastBlock */ + signedLastBlock?: boolean | null; + } + + /** Represents a VoteInfo. */ + class VoteInfo implements IVoteInfo { + /** + * Constructs a new VoteInfo. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IVoteInfo); + + /** VoteInfo validator. */ + public validator?: tendermint.abci.types.IValidator | null; + + /** VoteInfo signedLastBlock. */ + public signedLastBlock: boolean; + + /** + * Creates a new VoteInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VoteInfo instance + */ + public static create(properties?: tendermint.abci.types.IVoteInfo): tendermint.abci.types.VoteInfo; + + /** + * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. + * @param m VoteInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IVoteInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VoteInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns VoteInfo + * @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): tendermint.abci.types.VoteInfo; + } + + /** Properties of a PubKey. */ + interface IPubKey { + /** PubKey type */ + type?: string | null; + + /** PubKey data */ + data?: Uint8Array | null; + } + + /** Represents a PubKey. */ + class PubKey implements IPubKey { + /** + * Constructs a new PubKey. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IPubKey); + + /** PubKey type. */ + public type: string; + + /** PubKey data. */ + public data: Uint8Array; + + /** + * Creates a new PubKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PubKey instance + */ + public static create(properties?: tendermint.abci.types.IPubKey): tendermint.abci.types.PubKey; + + /** + * Encodes the specified PubKey message. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. + * @param m PubKey message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IPubKey, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubKey message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns PubKey + * @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): tendermint.abci.types.PubKey; + } + + /** Properties of an Evidence. */ + interface IEvidence { + /** Evidence type */ + type?: string | null; + + /** Evidence validator */ + validator?: tendermint.abci.types.IValidator | null; + + /** Evidence height */ + height?: number | Long | null; + + /** Evidence time */ + time?: google.protobuf.ITimestamp | null; + + /** Evidence totalVotingPower */ + totalVotingPower?: number | Long | null; + } + + /** Represents an Evidence. */ + class Evidence implements IEvidence { + /** + * Constructs a new Evidence. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IEvidence); + + /** Evidence type. */ + public type: string; + + /** Evidence validator. */ + public validator?: tendermint.abci.types.IValidator | null; + + /** Evidence height. */ + public height: number | Long; + + /** Evidence time. */ + public time?: google.protobuf.ITimestamp | null; + + /** Evidence totalVotingPower. */ + public totalVotingPower: number | Long; + + /** + * Creates a new Evidence instance using the specified properties. + * @param [properties] Properties to set + * @returns Evidence instance + */ + public static create(properties?: tendermint.abci.types.IEvidence): tendermint.abci.types.Evidence; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. + * @param m Evidence message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IEvidence, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Evidence + * @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): tendermint.abci.types.Evidence; + } + + /** Represents a ABCIApplication */ + class ABCIApplication extends $protobuf.rpc.Service { + /** + * Constructs a new ABCIApplication service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ABCIApplication service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean, + ): ABCIApplication; + + /** + * Calls Echo. + * @param request RequestEcho message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseEcho + */ + public echo( + request: tendermint.abci.types.IRequestEcho, + callback: tendermint.abci.types.ABCIApplication.EchoCallback, + ): void; + + /** + * Calls Echo. + * @param request RequestEcho message or plain object + * @returns Promise + */ + public echo(request: tendermint.abci.types.IRequestEcho): Promise; + + /** + * Calls Flush. + * @param request RequestFlush message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseFlush + */ + public flush( + request: tendermint.abci.types.IRequestFlush, + callback: tendermint.abci.types.ABCIApplication.FlushCallback, + ): void; + + /** + * Calls Flush. + * @param request RequestFlush message or plain object + * @returns Promise + */ + public flush( + request: tendermint.abci.types.IRequestFlush, + ): Promise; + + /** + * Calls Info. + * @param request RequestInfo message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseInfo + */ + public info( + request: tendermint.abci.types.IRequestInfo, + callback: tendermint.abci.types.ABCIApplication.InfoCallback, + ): void; + + /** + * Calls Info. + * @param request RequestInfo message or plain object + * @returns Promise + */ + public info(request: tendermint.abci.types.IRequestInfo): Promise; + + /** + * Calls SetOption. + * @param request RequestSetOption message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseSetOption + */ + public setOption( + request: tendermint.abci.types.IRequestSetOption, + callback: tendermint.abci.types.ABCIApplication.SetOptionCallback, + ): void; + + /** + * Calls SetOption. + * @param request RequestSetOption message or plain object + * @returns Promise + */ + public setOption( + request: tendermint.abci.types.IRequestSetOption, + ): Promise; + + /** + * Calls DeliverTx. + * @param request RequestDeliverTx message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseDeliverTx + */ + public deliverTx( + request: tendermint.abci.types.IRequestDeliverTx, + callback: tendermint.abci.types.ABCIApplication.DeliverTxCallback, + ): void; + + /** + * Calls DeliverTx. + * @param request RequestDeliverTx message or plain object + * @returns Promise + */ + public deliverTx( + request: tendermint.abci.types.IRequestDeliverTx, + ): Promise; + + /** + * Calls CheckTx. + * @param request RequestCheckTx message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseCheckTx + */ + public checkTx( + request: tendermint.abci.types.IRequestCheckTx, + callback: tendermint.abci.types.ABCIApplication.CheckTxCallback, + ): void; + + /** + * Calls CheckTx. + * @param request RequestCheckTx message or plain object + * @returns Promise + */ + public checkTx( + request: tendermint.abci.types.IRequestCheckTx, + ): Promise; + + /** + * Calls Query. + * @param request RequestQuery message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseQuery + */ + public query( + request: tendermint.abci.types.IRequestQuery, + callback: tendermint.abci.types.ABCIApplication.QueryCallback, + ): void; + + /** + * Calls Query. + * @param request RequestQuery message or plain object + * @returns Promise + */ + public query( + request: tendermint.abci.types.IRequestQuery, + ): Promise; + + /** + * Calls Commit. + * @param request RequestCommit message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseCommit + */ + public commit( + request: tendermint.abci.types.IRequestCommit, + callback: tendermint.abci.types.ABCIApplication.CommitCallback, + ): void; + + /** + * Calls Commit. + * @param request RequestCommit message or plain object + * @returns Promise + */ + public commit( + request: tendermint.abci.types.IRequestCommit, + ): Promise; + + /** + * Calls InitChain. + * @param request RequestInitChain message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseInitChain + */ + public initChain( + request: tendermint.abci.types.IRequestInitChain, + callback: tendermint.abci.types.ABCIApplication.InitChainCallback, + ): void; + + /** + * Calls InitChain. + * @param request RequestInitChain message or plain object + * @returns Promise + */ + public initChain( + request: tendermint.abci.types.IRequestInitChain, + ): Promise; + + /** + * Calls BeginBlock. + * @param request RequestBeginBlock message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseBeginBlock + */ + public beginBlock( + request: tendermint.abci.types.IRequestBeginBlock, + callback: tendermint.abci.types.ABCIApplication.BeginBlockCallback, + ): void; + + /** + * Calls BeginBlock. + * @param request RequestBeginBlock message or plain object + * @returns Promise + */ + public beginBlock( + request: tendermint.abci.types.IRequestBeginBlock, + ): Promise; + + /** + * Calls EndBlock. + * @param request RequestEndBlock message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseEndBlock + */ + public endBlock( + request: tendermint.abci.types.IRequestEndBlock, + callback: tendermint.abci.types.ABCIApplication.EndBlockCallback, + ): void; + + /** + * Calls EndBlock. + * @param request RequestEndBlock message or plain object + * @returns Promise + */ + public endBlock( + request: tendermint.abci.types.IRequestEndBlock, + ): Promise; + } + + namespace ABCIApplication { + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#echo}. + * @param error Error, if any + * @param [response] ResponseEcho + */ + type EchoCallback = (error: Error | null, response?: tendermint.abci.types.ResponseEcho) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#flush}. + * @param error Error, if any + * @param [response] ResponseFlush + */ + type FlushCallback = (error: Error | null, response?: tendermint.abci.types.ResponseFlush) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#info}. + * @param error Error, if any + * @param [response] ResponseInfo + */ + type InfoCallback = (error: Error | null, response?: tendermint.abci.types.ResponseInfo) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#setOption}. + * @param error Error, if any + * @param [response] ResponseSetOption + */ + type SetOptionCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseSetOption, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#deliverTx}. + * @param error Error, if any + * @param [response] ResponseDeliverTx + */ + type DeliverTxCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseDeliverTx, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#checkTx}. + * @param error Error, if any + * @param [response] ResponseCheckTx + */ + type CheckTxCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseCheckTx, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#query}. + * @param error Error, if any + * @param [response] ResponseQuery + */ + type QueryCallback = (error: Error | null, response?: tendermint.abci.types.ResponseQuery) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#commit}. + * @param error Error, if any + * @param [response] ResponseCommit + */ + type CommitCallback = (error: Error | null, response?: tendermint.abci.types.ResponseCommit) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#initChain}. + * @param error Error, if any + * @param [response] ResponseInitChain + */ + type InitChainCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseInitChain, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#beginBlock}. + * @param error Error, if any + * @param [response] ResponseBeginBlock + */ + type BeginBlockCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseBeginBlock, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#endBlock}. + * @param error Error, if any + * @param [response] ResponseEndBlock + */ + type EndBlockCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseEndBlock, + ) => void; + } + } + } + + /** Namespace crypto. */ + namespace crypto { + /** Namespace merkle. */ + namespace merkle { + /** Properties of a ProofOp. */ + interface IProofOp { + /** ProofOp type */ + type?: string | null; + + /** ProofOp key */ + key?: Uint8Array | null; + + /** ProofOp data */ + data?: Uint8Array | null; + } + + /** Represents a ProofOp. */ + class ProofOp implements IProofOp { + /** + * Constructs a new ProofOp. + * @param [p] Properties to set + */ + constructor(p?: tendermint.crypto.merkle.IProofOp); + + /** ProofOp type. */ + public type: string; + + /** ProofOp key. */ + public key: Uint8Array; + + /** ProofOp data. */ + public data: Uint8Array; + + /** + * Creates a new ProofOp instance using the specified properties. + * @param [properties] Properties to set + * @returns ProofOp instance + */ + public static create( + properties?: tendermint.crypto.merkle.IProofOp, + ): tendermint.crypto.merkle.ProofOp; + + /** + * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. + * @param m ProofOp message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.crypto.merkle.IProofOp, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProofOp message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ProofOp + * @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): tendermint.crypto.merkle.ProofOp; + } + + /** Properties of a Proof. */ + interface IProof { + /** Proof ops */ + ops?: tendermint.crypto.merkle.IProofOp[] | null; + } + + /** Represents a Proof. */ + class Proof implements IProof { + /** + * Constructs a new Proof. + * @param [p] Properties to set + */ + constructor(p?: tendermint.crypto.merkle.IProof); + + /** Proof ops. */ + public ops: tendermint.crypto.merkle.IProofOp[]; + + /** + * Creates a new Proof instance using the specified properties. + * @param [properties] Properties to set + * @returns Proof instance + */ + public static create(properties?: tendermint.crypto.merkle.IProof): tendermint.crypto.merkle.Proof; + + /** + * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. + * @param m Proof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.crypto.merkle.IProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Proof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Proof + * @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): tendermint.crypto.merkle.Proof; + } + } + } + + /** Namespace libs. */ + namespace libs { + /** Namespace kv. */ + namespace kv { + /** Properties of a Pair. */ + interface IPair { + /** Pair key */ + key?: Uint8Array | null; + + /** Pair value */ + value?: Uint8Array | null; + } + + /** Represents a Pair. */ + class Pair implements IPair { + /** + * Constructs a new Pair. + * @param [p] Properties to set + */ + constructor(p?: tendermint.libs.kv.IPair); + + /** Pair key. */ + public key: Uint8Array; + + /** Pair value. */ + public value: Uint8Array; + + /** + * Creates a new Pair instance using the specified properties. + * @param [properties] Properties to set + * @returns Pair instance + */ + public static create(properties?: tendermint.libs.kv.IPair): tendermint.libs.kv.Pair; + + /** + * Encodes the specified Pair message. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. + * @param m Pair message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.libs.kv.IPair, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pair message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Pair + * @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): tendermint.libs.kv.Pair; + } + + /** Properties of a KI64Pair. */ + interface IKI64Pair { + /** KI64Pair key */ + key?: Uint8Array | null; + + /** KI64Pair value */ + value?: number | Long | null; + } + + /** Represents a KI64Pair. */ + class KI64Pair implements IKI64Pair { + /** + * Constructs a new KI64Pair. + * @param [p] Properties to set + */ + constructor(p?: tendermint.libs.kv.IKI64Pair); + + /** KI64Pair key. */ + public key: Uint8Array; + + /** KI64Pair value. */ + public value: number | Long; + + /** + * Creates a new KI64Pair instance using the specified properties. + * @param [properties] Properties to set + * @returns KI64Pair instance + */ + public static create(properties?: tendermint.libs.kv.IKI64Pair): tendermint.libs.kv.KI64Pair; + + /** + * Encodes the specified KI64Pair message. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. + * @param m KI64Pair message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.libs.kv.IKI64Pair, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KI64Pair message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns KI64Pair + * @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): tendermint.libs.kv.KI64Pair; + } + } + } +} + +/** Namespace google. */ +export namespace google { + /** Namespace protobuf. */ + namespace protobuf { + /** Properties of an Any. */ + interface IAny { + /** Any type_url */ + type_url?: string | null; + + /** Any value */ + value?: Uint8Array | null; + } + + /** Represents an Any. */ + class Any implements IAny { + /** + * Constructs a new Any. + * @param [p] Properties to set + */ + constructor(p?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: Uint8Array; + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param m Any message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: google.protobuf.IAny, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Any + * @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): google.protobuf.Any; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + /** Timestamp seconds */ + seconds?: number | Long | null; + + /** Timestamp nanos */ + nanos?: number | null; + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + /** + * Constructs a new Timestamp. + * @param [p] Properties to set + */ + constructor(p?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: number | Long; + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param m Timestamp message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: google.protobuf.ITimestamp, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Timestamp + * @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): google.protobuf.Timestamp; + } + + /** Properties of a Duration. */ + interface IDuration { + /** Duration seconds */ + seconds?: number | Long | null; + + /** Duration nanos */ + nanos?: number | null; + } + + /** Represents a Duration. */ + class Duration implements IDuration { + /** + * Constructs a new Duration. + * @param [p] Properties to set + */ + constructor(p?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: number | Long; + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param m Duration message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: google.protobuf.IDuration, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Duration + * @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): google.protobuf.Duration; + } + } +} diff --git a/packages/demo-protobuf/src/generated/codecimpl.js b/packages/demo-protobuf/src/generated/codecimpl.js new file mode 100644 index 00000000..97f9943f --- /dev/null +++ b/packages/demo-protobuf/src/generated/codecimpl.js @@ -0,0 +1,3791 @@ +"use strict"; +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; + })(); + cosmos_sdk.v1 = (function () { + var v1 = {}; + v1.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_sdk.v1.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; + })(); + v1.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_sdk.v1.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; + })(); + 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(); + 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; + })(); + v1.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_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(); + 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_sdk.v1.SimulationResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.gasInfo = $root.cosmos_sdk.v1.GasInfo.decode(r, r.uint32()); + break; + case 2: + m.result = $root.cosmos_sdk.v1.Result.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return SimulationResponse; + })(); + v1.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_sdk.v1.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; + })(); + v1.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_sdk.v1.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_sdk.v1.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_sdk.v1.MsgData.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return TxData; + })(); + return v1; + })(); + cosmos_sdk.tx = (function () { + var tx = {}; + tx.v1 = (function () { + var v1 = {}; + v1.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_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]); + } + 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_sdk.tx.v1.Tx(); + 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()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Tx; + })(); + v1.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.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); + }; + SignDoc.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); + 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_sdk.tx.v1.SignDoc(); + 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: + 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; + })(); + 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]]; + } + 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_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; + })(); + 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; + })(); + 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; +})(); +$root.tendermint = (function () { + var tendermint = {}; + tendermint.abci = (function () { + var abci = {}; + abci.types = (function () { + var types = {}; + types.Request = (function () { + function Request(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]]; + } + Request.prototype.echo = null; + Request.prototype.flush = null; + Request.prototype.info = null; + Request.prototype.setOption = null; + Request.prototype.initChain = null; + Request.prototype.query = null; + Request.prototype.beginBlock = null; + Request.prototype.checkTx = null; + Request.prototype.deliverTx = null; + Request.prototype.endBlock = null; + Request.prototype.commit = null; + var $oneOfFields; + Object.defineProperty(Request.prototype, "value", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "echo", + "flush", + "info", + "setOption", + "initChain", + "query", + "beginBlock", + "checkTx", + "deliverTx", + "endBlock", + "commit", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + Request.create = function create(properties) { + return new Request(properties); + }; + Request.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.echo != null && Object.hasOwnProperty.call(m, "echo")) + $root.tendermint.abci.types.RequestEcho.encode(m.echo, w.uint32(18).fork()).ldelim(); + if (m.flush != null && Object.hasOwnProperty.call(m, "flush")) + $root.tendermint.abci.types.RequestFlush.encode(m.flush, w.uint32(26).fork()).ldelim(); + if (m.info != null && Object.hasOwnProperty.call(m, "info")) + $root.tendermint.abci.types.RequestInfo.encode(m.info, w.uint32(34).fork()).ldelim(); + if (m.setOption != null && Object.hasOwnProperty.call(m, "setOption")) + $root.tendermint.abci.types.RequestSetOption.encode(m.setOption, w.uint32(42).fork()).ldelim(); + if (m.initChain != null && Object.hasOwnProperty.call(m, "initChain")) + $root.tendermint.abci.types.RequestInitChain.encode(m.initChain, w.uint32(50).fork()).ldelim(); + if (m.query != null && Object.hasOwnProperty.call(m, "query")) + $root.tendermint.abci.types.RequestQuery.encode(m.query, w.uint32(58).fork()).ldelim(); + if (m.beginBlock != null && Object.hasOwnProperty.call(m, "beginBlock")) + $root.tendermint.abci.types.RequestBeginBlock.encode(m.beginBlock, w.uint32(66).fork()).ldelim(); + if (m.checkTx != null && Object.hasOwnProperty.call(m, "checkTx")) + $root.tendermint.abci.types.RequestCheckTx.encode(m.checkTx, w.uint32(74).fork()).ldelim(); + if (m.endBlock != null && Object.hasOwnProperty.call(m, "endBlock")) + $root.tendermint.abci.types.RequestEndBlock.encode(m.endBlock, w.uint32(90).fork()).ldelim(); + if (m.commit != null && Object.hasOwnProperty.call(m, "commit")) + $root.tendermint.abci.types.RequestCommit.encode(m.commit, w.uint32(98).fork()).ldelim(); + if (m.deliverTx != null && Object.hasOwnProperty.call(m, "deliverTx")) + $root.tendermint.abci.types.RequestDeliverTx.encode(m.deliverTx, w.uint32(154).fork()).ldelim(); + return w; + }; + Request.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.tendermint.abci.types.Request(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 2: + m.echo = $root.tendermint.abci.types.RequestEcho.decode(r, r.uint32()); + break; + case 3: + m.flush = $root.tendermint.abci.types.RequestFlush.decode(r, r.uint32()); + break; + case 4: + m.info = $root.tendermint.abci.types.RequestInfo.decode(r, r.uint32()); + break; + case 5: + m.setOption = $root.tendermint.abci.types.RequestSetOption.decode(r, r.uint32()); + break; + case 6: + m.initChain = $root.tendermint.abci.types.RequestInitChain.decode(r, r.uint32()); + break; + case 7: + m.query = $root.tendermint.abci.types.RequestQuery.decode(r, r.uint32()); + break; + case 8: + m.beginBlock = $root.tendermint.abci.types.RequestBeginBlock.decode(r, r.uint32()); + break; + case 9: + m.checkTx = $root.tendermint.abci.types.RequestCheckTx.decode(r, r.uint32()); + break; + case 19: + m.deliverTx = $root.tendermint.abci.types.RequestDeliverTx.decode(r, r.uint32()); + break; + case 11: + m.endBlock = $root.tendermint.abci.types.RequestEndBlock.decode(r, r.uint32()); + break; + case 12: + m.commit = $root.tendermint.abci.types.RequestCommit.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Request; + })(); + types.RequestEcho = (function () { + function RequestEcho(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]]; + } + RequestEcho.prototype.message = ""; + RequestEcho.create = function create(properties) { + return new RequestEcho(properties); + }; + RequestEcho.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.message != null && Object.hasOwnProperty.call(m, "message")) w.uint32(10).string(m.message); + return w; + }; + RequestEcho.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.tendermint.abci.types.RequestEcho(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.message = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestEcho; + })(); + types.RequestFlush = (function () { + function RequestFlush(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]]; + } + RequestFlush.create = function create(properties) { + return new RequestFlush(properties); + }; + RequestFlush.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + RequestFlush.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.tendermint.abci.types.RequestFlush(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestFlush; + })(); + types.RequestInfo = (function () { + function RequestInfo(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]]; + } + RequestInfo.prototype.version = ""; + RequestInfo.prototype.blockVersion = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + RequestInfo.prototype.p2pVersion = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + RequestInfo.create = function create(properties) { + return new RequestInfo(properties); + }; + RequestInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.version != null && Object.hasOwnProperty.call(m, "version")) w.uint32(10).string(m.version); + if (m.blockVersion != null && Object.hasOwnProperty.call(m, "blockVersion")) + w.uint32(16).uint64(m.blockVersion); + if (m.p2pVersion != null && Object.hasOwnProperty.call(m, "p2pVersion")) + w.uint32(24).uint64(m.p2pVersion); + return w; + }; + RequestInfo.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.tendermint.abci.types.RequestInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.version = r.string(); + break; + case 2: + m.blockVersion = r.uint64(); + break; + case 3: + m.p2pVersion = r.uint64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestInfo; + })(); + types.RequestSetOption = (function () { + function RequestSetOption(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]]; + } + RequestSetOption.prototype.key = ""; + RequestSetOption.prototype.value = ""; + RequestSetOption.create = function create(properties) { + return new RequestSetOption(properties); + }; + RequestSetOption.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(10).string(m.key); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) w.uint32(18).string(m.value); + return w; + }; + RequestSetOption.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.tendermint.abci.types.RequestSetOption(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.key = r.string(); + break; + case 2: + m.value = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestSetOption; + })(); + types.RequestInitChain = (function () { + function RequestInitChain(p) { + this.validators = []; + 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]]; + } + RequestInitChain.prototype.time = null; + RequestInitChain.prototype.chainId = ""; + RequestInitChain.prototype.consensusParams = null; + RequestInitChain.prototype.validators = $util.emptyArray; + RequestInitChain.prototype.appStateBytes = $util.newBuffer([]); + RequestInitChain.create = function create(properties) { + return new RequestInitChain(properties); + }; + RequestInitChain.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.time != null && Object.hasOwnProperty.call(m, "time")) + $root.google.protobuf.Timestamp.encode(m.time, w.uint32(10).fork()).ldelim(); + if (m.chainId != null && Object.hasOwnProperty.call(m, "chainId")) w.uint32(18).string(m.chainId); + if (m.consensusParams != null && Object.hasOwnProperty.call(m, "consensusParams")) + $root.tendermint.abci.types.ConsensusParams.encode( + m.consensusParams, + w.uint32(26).fork(), + ).ldelim(); + if (m.validators != null && m.validators.length) { + for (var i = 0; i < m.validators.length; ++i) + $root.tendermint.abci.types.ValidatorUpdate.encode( + m.validators[i], + w.uint32(34).fork(), + ).ldelim(); + } + if (m.appStateBytes != null && Object.hasOwnProperty.call(m, "appStateBytes")) + w.uint32(42).bytes(m.appStateBytes); + return w; + }; + RequestInitChain.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.tendermint.abci.types.RequestInitChain(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); + break; + case 2: + m.chainId = r.string(); + break; + case 3: + m.consensusParams = $root.tendermint.abci.types.ConsensusParams.decode(r, r.uint32()); + break; + case 4: + if (!(m.validators && m.validators.length)) m.validators = []; + m.validators.push($root.tendermint.abci.types.ValidatorUpdate.decode(r, r.uint32())); + break; + case 5: + m.appStateBytes = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestInitChain; + })(); + types.RequestQuery = (function () { + function RequestQuery(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]]; + } + RequestQuery.prototype.data = $util.newBuffer([]); + RequestQuery.prototype.path = ""; + RequestQuery.prototype.height = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + RequestQuery.prototype.prove = false; + RequestQuery.create = function create(properties) { + return new RequestQuery(properties); + }; + RequestQuery.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.path != null && Object.hasOwnProperty.call(m, "path")) w.uint32(18).string(m.path); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) w.uint32(24).int64(m.height); + if (m.prove != null && Object.hasOwnProperty.call(m, "prove")) w.uint32(32).bool(m.prove); + return w; + }; + RequestQuery.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.tendermint.abci.types.RequestQuery(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.data = r.bytes(); + break; + case 2: + m.path = r.string(); + break; + case 3: + m.height = r.int64(); + break; + case 4: + m.prove = r.bool(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestQuery; + })(); + types.RequestBeginBlock = (function () { + function RequestBeginBlock(p) { + this.byzantineValidators = []; + 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]]; + } + RequestBeginBlock.prototype.hash = $util.newBuffer([]); + RequestBeginBlock.prototype.header = null; + RequestBeginBlock.prototype.lastCommitInfo = null; + RequestBeginBlock.prototype.byzantineValidators = $util.emptyArray; + RequestBeginBlock.create = function create(properties) { + return new RequestBeginBlock(properties); + }; + RequestBeginBlock.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.hash != null && Object.hasOwnProperty.call(m, "hash")) w.uint32(10).bytes(m.hash); + if (m.header != null && Object.hasOwnProperty.call(m, "header")) + $root.tendermint.abci.types.Header.encode(m.header, w.uint32(18).fork()).ldelim(); + if (m.lastCommitInfo != null && Object.hasOwnProperty.call(m, "lastCommitInfo")) + $root.tendermint.abci.types.LastCommitInfo.encode(m.lastCommitInfo, w.uint32(26).fork()).ldelim(); + if (m.byzantineValidators != null && m.byzantineValidators.length) { + for (var i = 0; i < m.byzantineValidators.length; ++i) + $root.tendermint.abci.types.Evidence.encode( + m.byzantineValidators[i], + w.uint32(34).fork(), + ).ldelim(); + } + return w; + }; + RequestBeginBlock.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.tendermint.abci.types.RequestBeginBlock(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.hash = r.bytes(); + break; + case 2: + m.header = $root.tendermint.abci.types.Header.decode(r, r.uint32()); + break; + case 3: + m.lastCommitInfo = $root.tendermint.abci.types.LastCommitInfo.decode(r, r.uint32()); + break; + case 4: + if (!(m.byzantineValidators && m.byzantineValidators.length)) m.byzantineValidators = []; + m.byzantineValidators.push($root.tendermint.abci.types.Evidence.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestBeginBlock; + })(); + types.CheckTxType = (function () { + var valuesById = {}, + values = Object.create(valuesById); + values[(valuesById[0] = "New")] = 0; + values[(valuesById[1] = "Recheck")] = 1; + return values; + })(); + types.RequestCheckTx = (function () { + function RequestCheckTx(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]]; + } + RequestCheckTx.prototype.tx = $util.newBuffer([]); + RequestCheckTx.prototype.type = 0; + RequestCheckTx.create = function create(properties) { + return new RequestCheckTx(properties); + }; + RequestCheckTx.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.tx != null && Object.hasOwnProperty.call(m, "tx")) w.uint32(10).bytes(m.tx); + if (m.type != null && Object.hasOwnProperty.call(m, "type")) w.uint32(16).int32(m.type); + return w; + }; + RequestCheckTx.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.tendermint.abci.types.RequestCheckTx(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.tx = r.bytes(); + break; + case 2: + m.type = r.int32(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestCheckTx; + })(); + types.RequestDeliverTx = (function () { + function RequestDeliverTx(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]]; + } + RequestDeliverTx.prototype.tx = $util.newBuffer([]); + RequestDeliverTx.create = function create(properties) { + return new RequestDeliverTx(properties); + }; + RequestDeliverTx.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.tx != null && Object.hasOwnProperty.call(m, "tx")) w.uint32(10).bytes(m.tx); + return w; + }; + RequestDeliverTx.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.tendermint.abci.types.RequestDeliverTx(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.tx = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestDeliverTx; + })(); + types.RequestEndBlock = (function () { + function RequestEndBlock(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]]; + } + RequestEndBlock.prototype.height = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + RequestEndBlock.create = function create(properties) { + return new RequestEndBlock(properties); + }; + RequestEndBlock.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) w.uint32(8).int64(m.height); + return w; + }; + RequestEndBlock.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.tendermint.abci.types.RequestEndBlock(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.height = r.int64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestEndBlock; + })(); + types.RequestCommit = (function () { + function RequestCommit(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]]; + } + RequestCommit.create = function create(properties) { + return new RequestCommit(properties); + }; + RequestCommit.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + RequestCommit.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.tendermint.abci.types.RequestCommit(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return RequestCommit; + })(); + types.Response = (function () { + function Response(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]]; + } + Response.prototype.exception = null; + Response.prototype.echo = null; + Response.prototype.flush = null; + Response.prototype.info = null; + Response.prototype.setOption = null; + Response.prototype.initChain = null; + Response.prototype.query = null; + Response.prototype.beginBlock = null; + Response.prototype.checkTx = null; + Response.prototype.deliverTx = null; + Response.prototype.endBlock = null; + Response.prototype.commit = null; + var $oneOfFields; + Object.defineProperty(Response.prototype, "value", { + get: $util.oneOfGetter( + ($oneOfFields = [ + "exception", + "echo", + "flush", + "info", + "setOption", + "initChain", + "query", + "beginBlock", + "checkTx", + "deliverTx", + "endBlock", + "commit", + ]), + ), + set: $util.oneOfSetter($oneOfFields), + }); + Response.create = function create(properties) { + return new Response(properties); + }; + Response.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.exception != null && Object.hasOwnProperty.call(m, "exception")) + $root.tendermint.abci.types.ResponseException.encode(m.exception, w.uint32(10).fork()).ldelim(); + if (m.echo != null && Object.hasOwnProperty.call(m, "echo")) + $root.tendermint.abci.types.ResponseEcho.encode(m.echo, w.uint32(18).fork()).ldelim(); + if (m.flush != null && Object.hasOwnProperty.call(m, "flush")) + $root.tendermint.abci.types.ResponseFlush.encode(m.flush, w.uint32(26).fork()).ldelim(); + if (m.info != null && Object.hasOwnProperty.call(m, "info")) + $root.tendermint.abci.types.ResponseInfo.encode(m.info, w.uint32(34).fork()).ldelim(); + if (m.setOption != null && Object.hasOwnProperty.call(m, "setOption")) + $root.tendermint.abci.types.ResponseSetOption.encode(m.setOption, w.uint32(42).fork()).ldelim(); + if (m.initChain != null && Object.hasOwnProperty.call(m, "initChain")) + $root.tendermint.abci.types.ResponseInitChain.encode(m.initChain, w.uint32(50).fork()).ldelim(); + if (m.query != null && Object.hasOwnProperty.call(m, "query")) + $root.tendermint.abci.types.ResponseQuery.encode(m.query, w.uint32(58).fork()).ldelim(); + if (m.beginBlock != null && Object.hasOwnProperty.call(m, "beginBlock")) + $root.tendermint.abci.types.ResponseBeginBlock.encode(m.beginBlock, w.uint32(66).fork()).ldelim(); + if (m.checkTx != null && Object.hasOwnProperty.call(m, "checkTx")) + $root.tendermint.abci.types.ResponseCheckTx.encode(m.checkTx, w.uint32(74).fork()).ldelim(); + if (m.deliverTx != null && Object.hasOwnProperty.call(m, "deliverTx")) + $root.tendermint.abci.types.ResponseDeliverTx.encode(m.deliverTx, w.uint32(82).fork()).ldelim(); + if (m.endBlock != null && Object.hasOwnProperty.call(m, "endBlock")) + $root.tendermint.abci.types.ResponseEndBlock.encode(m.endBlock, w.uint32(90).fork()).ldelim(); + if (m.commit != null && Object.hasOwnProperty.call(m, "commit")) + $root.tendermint.abci.types.ResponseCommit.encode(m.commit, w.uint32(98).fork()).ldelim(); + return w; + }; + Response.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.tendermint.abci.types.Response(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.exception = $root.tendermint.abci.types.ResponseException.decode(r, r.uint32()); + break; + case 2: + m.echo = $root.tendermint.abci.types.ResponseEcho.decode(r, r.uint32()); + break; + case 3: + m.flush = $root.tendermint.abci.types.ResponseFlush.decode(r, r.uint32()); + break; + case 4: + m.info = $root.tendermint.abci.types.ResponseInfo.decode(r, r.uint32()); + break; + case 5: + m.setOption = $root.tendermint.abci.types.ResponseSetOption.decode(r, r.uint32()); + break; + case 6: + m.initChain = $root.tendermint.abci.types.ResponseInitChain.decode(r, r.uint32()); + break; + case 7: + m.query = $root.tendermint.abci.types.ResponseQuery.decode(r, r.uint32()); + break; + case 8: + m.beginBlock = $root.tendermint.abci.types.ResponseBeginBlock.decode(r, r.uint32()); + break; + case 9: + m.checkTx = $root.tendermint.abci.types.ResponseCheckTx.decode(r, r.uint32()); + break; + case 10: + m.deliverTx = $root.tendermint.abci.types.ResponseDeliverTx.decode(r, r.uint32()); + break; + case 11: + m.endBlock = $root.tendermint.abci.types.ResponseEndBlock.decode(r, r.uint32()); + break; + case 12: + m.commit = $root.tendermint.abci.types.ResponseCommit.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Response; + })(); + types.ResponseException = (function () { + function ResponseException(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]]; + } + ResponseException.prototype.error = ""; + ResponseException.create = function create(properties) { + return new ResponseException(properties); + }; + ResponseException.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.error != null && Object.hasOwnProperty.call(m, "error")) w.uint32(10).string(m.error); + return w; + }; + ResponseException.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.tendermint.abci.types.ResponseException(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.error = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseException; + })(); + types.ResponseEcho = (function () { + function ResponseEcho(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]]; + } + ResponseEcho.prototype.message = ""; + ResponseEcho.create = function create(properties) { + return new ResponseEcho(properties); + }; + ResponseEcho.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.message != null && Object.hasOwnProperty.call(m, "message")) w.uint32(10).string(m.message); + return w; + }; + ResponseEcho.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.tendermint.abci.types.ResponseEcho(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.message = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseEcho; + })(); + types.ResponseFlush = (function () { + function ResponseFlush(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]]; + } + ResponseFlush.create = function create(properties) { + return new ResponseFlush(properties); + }; + ResponseFlush.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + return w; + }; + ResponseFlush.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.tendermint.abci.types.ResponseFlush(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseFlush; + })(); + types.ResponseInfo = (function () { + function ResponseInfo(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]]; + } + ResponseInfo.prototype.data = ""; + ResponseInfo.prototype.version = ""; + ResponseInfo.prototype.appVersion = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + ResponseInfo.prototype.lastBlockHeight = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + ResponseInfo.prototype.lastBlockAppHash = $util.newBuffer([]); + ResponseInfo.create = function create(properties) { + return new ResponseInfo(properties); + }; + ResponseInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(10).string(m.data); + if (m.version != null && Object.hasOwnProperty.call(m, "version")) w.uint32(18).string(m.version); + if (m.appVersion != null && Object.hasOwnProperty.call(m, "appVersion")) + w.uint32(24).uint64(m.appVersion); + if (m.lastBlockHeight != null && Object.hasOwnProperty.call(m, "lastBlockHeight")) + w.uint32(32).int64(m.lastBlockHeight); + if (m.lastBlockAppHash != null && Object.hasOwnProperty.call(m, "lastBlockAppHash")) + w.uint32(42).bytes(m.lastBlockAppHash); + return w; + }; + ResponseInfo.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.tendermint.abci.types.ResponseInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.data = r.string(); + break; + case 2: + m.version = r.string(); + break; + case 3: + m.appVersion = r.uint64(); + break; + case 4: + m.lastBlockHeight = r.int64(); + break; + case 5: + m.lastBlockAppHash = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseInfo; + })(); + types.ResponseSetOption = (function () { + function ResponseSetOption(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]]; + } + ResponseSetOption.prototype.code = 0; + ResponseSetOption.prototype.log = ""; + ResponseSetOption.prototype.info = ""; + ResponseSetOption.create = function create(properties) { + return new ResponseSetOption(properties); + }; + ResponseSetOption.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.code != null && Object.hasOwnProperty.call(m, "code")) w.uint32(8).uint32(m.code); + if (m.log != null && Object.hasOwnProperty.call(m, "log")) w.uint32(26).string(m.log); + if (m.info != null && Object.hasOwnProperty.call(m, "info")) w.uint32(34).string(m.info); + return w; + }; + ResponseSetOption.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.tendermint.abci.types.ResponseSetOption(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.code = r.uint32(); + break; + case 3: + m.log = r.string(); + break; + case 4: + m.info = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseSetOption; + })(); + types.ResponseInitChain = (function () { + function ResponseInitChain(p) { + this.validators = []; + 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]]; + } + ResponseInitChain.prototype.consensusParams = null; + ResponseInitChain.prototype.validators = $util.emptyArray; + ResponseInitChain.create = function create(properties) { + return new ResponseInitChain(properties); + }; + ResponseInitChain.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.consensusParams != null && Object.hasOwnProperty.call(m, "consensusParams")) + $root.tendermint.abci.types.ConsensusParams.encode( + m.consensusParams, + w.uint32(10).fork(), + ).ldelim(); + if (m.validators != null && m.validators.length) { + for (var i = 0; i < m.validators.length; ++i) + $root.tendermint.abci.types.ValidatorUpdate.encode( + m.validators[i], + w.uint32(18).fork(), + ).ldelim(); + } + return w; + }; + ResponseInitChain.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.tendermint.abci.types.ResponseInitChain(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.consensusParams = $root.tendermint.abci.types.ConsensusParams.decode(r, r.uint32()); + break; + case 2: + if (!(m.validators && m.validators.length)) m.validators = []; + m.validators.push($root.tendermint.abci.types.ValidatorUpdate.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseInitChain; + })(); + types.ResponseQuery = (function () { + function ResponseQuery(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]]; + } + ResponseQuery.prototype.code = 0; + ResponseQuery.prototype.log = ""; + ResponseQuery.prototype.info = ""; + ResponseQuery.prototype.index = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + ResponseQuery.prototype.key = $util.newBuffer([]); + ResponseQuery.prototype.value = $util.newBuffer([]); + ResponseQuery.prototype.proof = null; + ResponseQuery.prototype.height = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + ResponseQuery.prototype.codespace = ""; + ResponseQuery.create = function create(properties) { + return new ResponseQuery(properties); + }; + ResponseQuery.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.code != null && Object.hasOwnProperty.call(m, "code")) w.uint32(8).uint32(m.code); + if (m.log != null && Object.hasOwnProperty.call(m, "log")) w.uint32(26).string(m.log); + if (m.info != null && Object.hasOwnProperty.call(m, "info")) w.uint32(34).string(m.info); + if (m.index != null && Object.hasOwnProperty.call(m, "index")) w.uint32(40).int64(m.index); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(50).bytes(m.key); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) w.uint32(58).bytes(m.value); + if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) + $root.tendermint.crypto.merkle.Proof.encode(m.proof, w.uint32(66).fork()).ldelim(); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) w.uint32(72).int64(m.height); + if (m.codespace != null && Object.hasOwnProperty.call(m, "codespace")) + w.uint32(82).string(m.codespace); + return w; + }; + ResponseQuery.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.tendermint.abci.types.ResponseQuery(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.code = r.uint32(); + break; + case 3: + m.log = r.string(); + break; + case 4: + m.info = r.string(); + break; + case 5: + m.index = r.int64(); + break; + case 6: + m.key = r.bytes(); + break; + case 7: + m.value = r.bytes(); + break; + case 8: + m.proof = $root.tendermint.crypto.merkle.Proof.decode(r, r.uint32()); + break; + case 9: + m.height = r.int64(); + break; + case 10: + m.codespace = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseQuery; + })(); + types.ResponseBeginBlock = (function () { + function ResponseBeginBlock(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]]; + } + ResponseBeginBlock.prototype.events = $util.emptyArray; + ResponseBeginBlock.create = function create(properties) { + return new ResponseBeginBlock(properties); + }; + ResponseBeginBlock.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + 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(10).fork()).ldelim(); + } + return w; + }; + ResponseBeginBlock.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.tendermint.abci.types.ResponseBeginBlock(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + 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 ResponseBeginBlock; + })(); + types.ResponseCheckTx = (function () { + function ResponseCheckTx(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]]; + } + ResponseCheckTx.prototype.code = 0; + ResponseCheckTx.prototype.data = $util.newBuffer([]); + ResponseCheckTx.prototype.log = ""; + ResponseCheckTx.prototype.info = ""; + ResponseCheckTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + ResponseCheckTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + ResponseCheckTx.prototype.events = $util.emptyArray; + ResponseCheckTx.prototype.codespace = ""; + ResponseCheckTx.create = function create(properties) { + return new ResponseCheckTx(properties); + }; + ResponseCheckTx.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.code != null && Object.hasOwnProperty.call(m, "code")) w.uint32(8).uint32(m.code); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(18).bytes(m.data); + if (m.log != null && Object.hasOwnProperty.call(m, "log")) w.uint32(26).string(m.log); + if (m.info != null && Object.hasOwnProperty.call(m, "info")) w.uint32(34).string(m.info); + if (m.gasWanted != null && Object.hasOwnProperty.call(m, "gasWanted")) + w.uint32(40).int64(m.gasWanted); + if (m.gasUsed != null && Object.hasOwnProperty.call(m, "gasUsed")) w.uint32(48).int64(m.gasUsed); + 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(58).fork()).ldelim(); + } + if (m.codespace != null && Object.hasOwnProperty.call(m, "codespace")) + w.uint32(66).string(m.codespace); + return w; + }; + ResponseCheckTx.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.tendermint.abci.types.ResponseCheckTx(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.code = r.uint32(); + break; + case 2: + m.data = r.bytes(); + break; + case 3: + m.log = r.string(); + break; + case 4: + m.info = r.string(); + break; + case 5: + m.gasWanted = r.int64(); + break; + case 6: + m.gasUsed = r.int64(); + break; + case 7: + if (!(m.events && m.events.length)) m.events = []; + m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); + break; + case 8: + m.codespace = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseCheckTx; + })(); + types.ResponseDeliverTx = (function () { + function ResponseDeliverTx(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]]; + } + ResponseDeliverTx.prototype.code = 0; + ResponseDeliverTx.prototype.data = $util.newBuffer([]); + ResponseDeliverTx.prototype.log = ""; + ResponseDeliverTx.prototype.info = ""; + ResponseDeliverTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + ResponseDeliverTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + ResponseDeliverTx.prototype.events = $util.emptyArray; + ResponseDeliverTx.prototype.codespace = ""; + ResponseDeliverTx.create = function create(properties) { + return new ResponseDeliverTx(properties); + }; + ResponseDeliverTx.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.code != null && Object.hasOwnProperty.call(m, "code")) w.uint32(8).uint32(m.code); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(18).bytes(m.data); + if (m.log != null && Object.hasOwnProperty.call(m, "log")) w.uint32(26).string(m.log); + if (m.info != null && Object.hasOwnProperty.call(m, "info")) w.uint32(34).string(m.info); + if (m.gasWanted != null && Object.hasOwnProperty.call(m, "gasWanted")) + w.uint32(40).int64(m.gasWanted); + if (m.gasUsed != null && Object.hasOwnProperty.call(m, "gasUsed")) w.uint32(48).int64(m.gasUsed); + 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(58).fork()).ldelim(); + } + if (m.codespace != null && Object.hasOwnProperty.call(m, "codespace")) + w.uint32(66).string(m.codespace); + return w; + }; + ResponseDeliverTx.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.tendermint.abci.types.ResponseDeliverTx(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.code = r.uint32(); + break; + case 2: + m.data = r.bytes(); + break; + case 3: + m.log = r.string(); + break; + case 4: + m.info = r.string(); + break; + case 5: + m.gasWanted = r.int64(); + break; + case 6: + m.gasUsed = r.int64(); + break; + case 7: + if (!(m.events && m.events.length)) m.events = []; + m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); + break; + case 8: + m.codespace = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseDeliverTx; + })(); + types.ResponseEndBlock = (function () { + function ResponseEndBlock(p) { + this.validatorUpdates = []; + 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]]; + } + ResponseEndBlock.prototype.validatorUpdates = $util.emptyArray; + ResponseEndBlock.prototype.consensusParamUpdates = null; + ResponseEndBlock.prototype.events = $util.emptyArray; + ResponseEndBlock.create = function create(properties) { + return new ResponseEndBlock(properties); + }; + ResponseEndBlock.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validatorUpdates != null && m.validatorUpdates.length) { + for (var i = 0; i < m.validatorUpdates.length; ++i) + $root.tendermint.abci.types.ValidatorUpdate.encode( + m.validatorUpdates[i], + w.uint32(10).fork(), + ).ldelim(); + } + if (m.consensusParamUpdates != null && Object.hasOwnProperty.call(m, "consensusParamUpdates")) + $root.tendermint.abci.types.ConsensusParams.encode( + m.consensusParamUpdates, + w.uint32(18).fork(), + ).ldelim(); + 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; + }; + ResponseEndBlock.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.tendermint.abci.types.ResponseEndBlock(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.validatorUpdates && m.validatorUpdates.length)) m.validatorUpdates = []; + m.validatorUpdates.push($root.tendermint.abci.types.ValidatorUpdate.decode(r, r.uint32())); + break; + case 2: + m.consensusParamUpdates = $root.tendermint.abci.types.ConsensusParams.decode(r, r.uint32()); + 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 ResponseEndBlock; + })(); + types.ResponseCommit = (function () { + function ResponseCommit(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]]; + } + ResponseCommit.prototype.data = $util.newBuffer([]); + ResponseCommit.create = function create(properties) { + return new ResponseCommit(properties); + }; + ResponseCommit.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(18).bytes(m.data); + return w; + }; + ResponseCommit.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.tendermint.abci.types.ResponseCommit(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 2: + m.data = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ResponseCommit; + })(); + types.ConsensusParams = (function () { + function ConsensusParams(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]]; + } + ConsensusParams.prototype.block = null; + ConsensusParams.prototype.evidence = null; + ConsensusParams.prototype.validator = null; + ConsensusParams.create = function create(properties) { + return new ConsensusParams(properties); + }; + ConsensusParams.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.block != null && Object.hasOwnProperty.call(m, "block")) + $root.tendermint.abci.types.BlockParams.encode(m.block, w.uint32(10).fork()).ldelim(); + if (m.evidence != null && Object.hasOwnProperty.call(m, "evidence")) + $root.tendermint.abci.types.EvidenceParams.encode(m.evidence, w.uint32(18).fork()).ldelim(); + if (m.validator != null && Object.hasOwnProperty.call(m, "validator")) + $root.tendermint.abci.types.ValidatorParams.encode(m.validator, w.uint32(26).fork()).ldelim(); + return w; + }; + ConsensusParams.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.tendermint.abci.types.ConsensusParams(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.block = $root.tendermint.abci.types.BlockParams.decode(r, r.uint32()); + break; + case 2: + m.evidence = $root.tendermint.abci.types.EvidenceParams.decode(r, r.uint32()); + break; + case 3: + m.validator = $root.tendermint.abci.types.ValidatorParams.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ConsensusParams; + })(); + types.BlockParams = (function () { + function BlockParams(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]]; + } + BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + BlockParams.create = function create(properties) { + return new BlockParams(properties); + }; + BlockParams.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.maxBytes != null && Object.hasOwnProperty.call(m, "maxBytes")) w.uint32(8).int64(m.maxBytes); + if (m.maxGas != null && Object.hasOwnProperty.call(m, "maxGas")) w.uint32(16).int64(m.maxGas); + return w; + }; + BlockParams.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.tendermint.abci.types.BlockParams(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.maxBytes = r.int64(); + break; + case 2: + m.maxGas = r.int64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return BlockParams; + })(); + types.EvidenceParams = (function () { + function EvidenceParams(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]]; + } + EvidenceParams.prototype.maxAgeNumBlocks = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + EvidenceParams.prototype.maxAgeDuration = null; + EvidenceParams.create = function create(properties) { + return new EvidenceParams(properties); + }; + EvidenceParams.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.maxAgeNumBlocks != null && Object.hasOwnProperty.call(m, "maxAgeNumBlocks")) + w.uint32(8).int64(m.maxAgeNumBlocks); + if (m.maxAgeDuration != null && Object.hasOwnProperty.call(m, "maxAgeDuration")) + $root.google.protobuf.Duration.encode(m.maxAgeDuration, w.uint32(18).fork()).ldelim(); + return w; + }; + EvidenceParams.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.tendermint.abci.types.EvidenceParams(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.maxAgeNumBlocks = r.int64(); + break; + case 2: + m.maxAgeDuration = $root.google.protobuf.Duration.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return EvidenceParams; + })(); + types.ValidatorParams = (function () { + function ValidatorParams(p) { + this.pubKeyTypes = []; + 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]]; + } + ValidatorParams.prototype.pubKeyTypes = $util.emptyArray; + ValidatorParams.create = function create(properties) { + return new ValidatorParams(properties); + }; + ValidatorParams.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.pubKeyTypes != null && m.pubKeyTypes.length) { + for (var i = 0; i < m.pubKeyTypes.length; ++i) w.uint32(10).string(m.pubKeyTypes[i]); + } + return w; + }; + ValidatorParams.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.tendermint.abci.types.ValidatorParams(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.pubKeyTypes && m.pubKeyTypes.length)) m.pubKeyTypes = []; + m.pubKeyTypes.push(r.string()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValidatorParams; + })(); + types.LastCommitInfo = (function () { + function LastCommitInfo(p) { + this.votes = []; + 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]]; + } + LastCommitInfo.prototype.round = 0; + LastCommitInfo.prototype.votes = $util.emptyArray; + LastCommitInfo.create = function create(properties) { + return new LastCommitInfo(properties); + }; + LastCommitInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.round != null && Object.hasOwnProperty.call(m, "round")) w.uint32(8).int32(m.round); + if (m.votes != null && m.votes.length) { + for (var i = 0; i < m.votes.length; ++i) + $root.tendermint.abci.types.VoteInfo.encode(m.votes[i], w.uint32(18).fork()).ldelim(); + } + return w; + }; + LastCommitInfo.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.tendermint.abci.types.LastCommitInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.round = r.int32(); + break; + case 2: + if (!(m.votes && m.votes.length)) m.votes = []; + m.votes.push($root.tendermint.abci.types.VoteInfo.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return LastCommitInfo; + })(); + types.Event = (function () { + function Event(p) { + this.attributes = []; + 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]]; + } + Event.prototype.type = ""; + Event.prototype.attributes = $util.emptyArray; + Event.create = function create(properties) { + return new Event(properties); + }; + Event.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.type != null && Object.hasOwnProperty.call(m, "type")) w.uint32(10).string(m.type); + if (m.attributes != null && m.attributes.length) { + for (var i = 0; i < m.attributes.length; ++i) + $root.tendermint.libs.kv.Pair.encode(m.attributes[i], w.uint32(18).fork()).ldelim(); + } + return w; + }; + Event.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.tendermint.abci.types.Event(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.type = r.string(); + break; + case 2: + if (!(m.attributes && m.attributes.length)) m.attributes = []; + m.attributes.push($root.tendermint.libs.kv.Pair.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Event; + })(); + types.Header = (function () { + function Header(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]]; + } + Header.prototype.version = null; + Header.prototype.chainId = ""; + Header.prototype.height = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + Header.prototype.time = null; + Header.prototype.lastBlockId = null; + Header.prototype.lastCommitHash = $util.newBuffer([]); + Header.prototype.dataHash = $util.newBuffer([]); + Header.prototype.validatorsHash = $util.newBuffer([]); + Header.prototype.nextValidatorsHash = $util.newBuffer([]); + Header.prototype.consensusHash = $util.newBuffer([]); + Header.prototype.appHash = $util.newBuffer([]); + Header.prototype.lastResultsHash = $util.newBuffer([]); + Header.prototype.evidenceHash = $util.newBuffer([]); + Header.prototype.proposerAddress = $util.newBuffer([]); + Header.create = function create(properties) { + return new Header(properties); + }; + Header.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.version != null && Object.hasOwnProperty.call(m, "version")) + $root.tendermint.abci.types.Version.encode(m.version, w.uint32(10).fork()).ldelim(); + if (m.chainId != null && Object.hasOwnProperty.call(m, "chainId")) w.uint32(18).string(m.chainId); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) w.uint32(24).int64(m.height); + if (m.time != null && Object.hasOwnProperty.call(m, "time")) + $root.google.protobuf.Timestamp.encode(m.time, w.uint32(34).fork()).ldelim(); + if (m.lastBlockId != null && Object.hasOwnProperty.call(m, "lastBlockId")) + $root.tendermint.abci.types.BlockID.encode(m.lastBlockId, w.uint32(42).fork()).ldelim(); + if (m.lastCommitHash != null && Object.hasOwnProperty.call(m, "lastCommitHash")) + w.uint32(50).bytes(m.lastCommitHash); + if (m.dataHash != null && Object.hasOwnProperty.call(m, "dataHash")) w.uint32(58).bytes(m.dataHash); + if (m.validatorsHash != null && Object.hasOwnProperty.call(m, "validatorsHash")) + w.uint32(66).bytes(m.validatorsHash); + if (m.nextValidatorsHash != null && Object.hasOwnProperty.call(m, "nextValidatorsHash")) + w.uint32(74).bytes(m.nextValidatorsHash); + if (m.consensusHash != null && Object.hasOwnProperty.call(m, "consensusHash")) + w.uint32(82).bytes(m.consensusHash); + if (m.appHash != null && Object.hasOwnProperty.call(m, "appHash")) w.uint32(90).bytes(m.appHash); + if (m.lastResultsHash != null && Object.hasOwnProperty.call(m, "lastResultsHash")) + w.uint32(98).bytes(m.lastResultsHash); + if (m.evidenceHash != null && Object.hasOwnProperty.call(m, "evidenceHash")) + w.uint32(106).bytes(m.evidenceHash); + if (m.proposerAddress != null && Object.hasOwnProperty.call(m, "proposerAddress")) + w.uint32(114).bytes(m.proposerAddress); + return w; + }; + Header.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.tendermint.abci.types.Header(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.version = $root.tendermint.abci.types.Version.decode(r, r.uint32()); + break; + case 2: + m.chainId = r.string(); + break; + case 3: + m.height = r.int64(); + break; + case 4: + m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); + break; + case 5: + m.lastBlockId = $root.tendermint.abci.types.BlockID.decode(r, r.uint32()); + break; + case 6: + m.lastCommitHash = r.bytes(); + break; + case 7: + m.dataHash = r.bytes(); + break; + case 8: + m.validatorsHash = r.bytes(); + break; + case 9: + m.nextValidatorsHash = r.bytes(); + break; + case 10: + m.consensusHash = r.bytes(); + break; + case 11: + m.appHash = r.bytes(); + break; + case 12: + m.lastResultsHash = r.bytes(); + break; + case 13: + m.evidenceHash = r.bytes(); + break; + case 14: + m.proposerAddress = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Header; + })(); + types.Version = (function () { + function Version(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]]; + } + Version.prototype.Block = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Version.prototype.App = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Version.create = function create(properties) { + return new Version(properties); + }; + Version.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.Block != null && Object.hasOwnProperty.call(m, "Block")) w.uint32(8).uint64(m.Block); + if (m.App != null && Object.hasOwnProperty.call(m, "App")) w.uint32(16).uint64(m.App); + return w; + }; + Version.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.tendermint.abci.types.Version(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.Block = r.uint64(); + break; + case 2: + m.App = r.uint64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Version; + })(); + types.BlockID = (function () { + function BlockID(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]]; + } + BlockID.prototype.hash = $util.newBuffer([]); + BlockID.prototype.partsHeader = null; + BlockID.create = function create(properties) { + return new BlockID(properties); + }; + BlockID.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.hash != null && Object.hasOwnProperty.call(m, "hash")) w.uint32(10).bytes(m.hash); + if (m.partsHeader != null && Object.hasOwnProperty.call(m, "partsHeader")) + $root.tendermint.abci.types.PartSetHeader.encode(m.partsHeader, w.uint32(18).fork()).ldelim(); + return w; + }; + BlockID.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.tendermint.abci.types.BlockID(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.hash = r.bytes(); + break; + case 2: + m.partsHeader = $root.tendermint.abci.types.PartSetHeader.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return BlockID; + })(); + types.PartSetHeader = (function () { + function PartSetHeader(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]]; + } + PartSetHeader.prototype.total = 0; + PartSetHeader.prototype.hash = $util.newBuffer([]); + PartSetHeader.create = function create(properties) { + return new PartSetHeader(properties); + }; + PartSetHeader.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.total != null && Object.hasOwnProperty.call(m, "total")) w.uint32(8).int32(m.total); + if (m.hash != null && Object.hasOwnProperty.call(m, "hash")) w.uint32(18).bytes(m.hash); + return w; + }; + PartSetHeader.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.tendermint.abci.types.PartSetHeader(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.total = r.int32(); + break; + case 2: + m.hash = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return PartSetHeader; + })(); + types.Validator = (function () { + function Validator(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]]; + } + Validator.prototype.address = $util.newBuffer([]); + Validator.prototype.power = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + Validator.create = function create(properties) { + return new Validator(properties); + }; + Validator.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.power != null && Object.hasOwnProperty.call(m, "power")) w.uint32(24).int64(m.power); + return w; + }; + Validator.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.tendermint.abci.types.Validator(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.address = r.bytes(); + break; + case 3: + m.power = r.int64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Validator; + })(); + types.ValidatorUpdate = (function () { + function ValidatorUpdate(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]]; + } + ValidatorUpdate.prototype.pubKey = null; + ValidatorUpdate.prototype.power = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + ValidatorUpdate.create = function create(properties) { + return new ValidatorUpdate(properties); + }; + ValidatorUpdate.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.pubKey != null && Object.hasOwnProperty.call(m, "pubKey")) + $root.tendermint.abci.types.PubKey.encode(m.pubKey, w.uint32(10).fork()).ldelim(); + if (m.power != null && Object.hasOwnProperty.call(m, "power")) w.uint32(16).int64(m.power); + return w; + }; + ValidatorUpdate.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.tendermint.abci.types.ValidatorUpdate(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.pubKey = $root.tendermint.abci.types.PubKey.decode(r, r.uint32()); + break; + case 2: + m.power = r.int64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ValidatorUpdate; + })(); + types.VoteInfo = (function () { + function VoteInfo(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]]; + } + VoteInfo.prototype.validator = null; + VoteInfo.prototype.signedLastBlock = false; + VoteInfo.create = function create(properties) { + return new VoteInfo(properties); + }; + VoteInfo.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.validator != null && Object.hasOwnProperty.call(m, "validator")) + $root.tendermint.abci.types.Validator.encode(m.validator, w.uint32(10).fork()).ldelim(); + if (m.signedLastBlock != null && Object.hasOwnProperty.call(m, "signedLastBlock")) + w.uint32(16).bool(m.signedLastBlock); + return w; + }; + VoteInfo.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.tendermint.abci.types.VoteInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.validator = $root.tendermint.abci.types.Validator.decode(r, r.uint32()); + break; + case 2: + m.signedLastBlock = r.bool(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return VoteInfo; + })(); + types.PubKey = (function () { + function PubKey(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]]; + } + PubKey.prototype.type = ""; + PubKey.prototype.data = $util.newBuffer([]); + PubKey.create = function create(properties) { + return new PubKey(properties); + }; + PubKey.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.type != null && Object.hasOwnProperty.call(m, "type")) w.uint32(10).string(m.type); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(18).bytes(m.data); + return w; + }; + PubKey.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.tendermint.abci.types.PubKey(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.type = r.string(); + break; + case 2: + m.data = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return PubKey; + })(); + types.Evidence = (function () { + function Evidence(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]]; + } + Evidence.prototype.type = ""; + Evidence.prototype.validator = null; + Evidence.prototype.height = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + Evidence.prototype.time = null; + Evidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + Evidence.create = function create(properties) { + return new Evidence(properties); + }; + Evidence.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.type != null && Object.hasOwnProperty.call(m, "type")) w.uint32(10).string(m.type); + if (m.validator != null && Object.hasOwnProperty.call(m, "validator")) + $root.tendermint.abci.types.Validator.encode(m.validator, w.uint32(18).fork()).ldelim(); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) w.uint32(24).int64(m.height); + if (m.time != null && Object.hasOwnProperty.call(m, "time")) + $root.google.protobuf.Timestamp.encode(m.time, w.uint32(34).fork()).ldelim(); + if (m.totalVotingPower != null && Object.hasOwnProperty.call(m, "totalVotingPower")) + w.uint32(40).int64(m.totalVotingPower); + return w; + }; + Evidence.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.tendermint.abci.types.Evidence(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.type = r.string(); + break; + case 2: + m.validator = $root.tendermint.abci.types.Validator.decode(r, r.uint32()); + break; + case 3: + m.height = r.int64(); + break; + case 4: + m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); + break; + case 5: + m.totalVotingPower = r.int64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Evidence; + })(); + types.ABCIApplication = (function () { + function ABCIApplication(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + (ABCIApplication.prototype = Object.create( + $protobuf.rpc.Service.prototype, + )).constructor = ABCIApplication; + ABCIApplication.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + Object.defineProperty( + (ABCIApplication.prototype.echo = function echo(request, callback) { + return this.rpcCall( + echo, + $root.tendermint.abci.types.RequestEcho, + $root.tendermint.abci.types.ResponseEcho, + request, + callback, + ); + }), + "name", + { value: "Echo" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.flush = function flush(request, callback) { + return this.rpcCall( + flush, + $root.tendermint.abci.types.RequestFlush, + $root.tendermint.abci.types.ResponseFlush, + request, + callback, + ); + }), + "name", + { value: "Flush" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.info = function info(request, callback) { + return this.rpcCall( + info, + $root.tendermint.abci.types.RequestInfo, + $root.tendermint.abci.types.ResponseInfo, + request, + callback, + ); + }), + "name", + { value: "Info" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.setOption = function setOption(request, callback) { + return this.rpcCall( + setOption, + $root.tendermint.abci.types.RequestSetOption, + $root.tendermint.abci.types.ResponseSetOption, + request, + callback, + ); + }), + "name", + { value: "SetOption" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.deliverTx = function deliverTx(request, callback) { + return this.rpcCall( + deliverTx, + $root.tendermint.abci.types.RequestDeliverTx, + $root.tendermint.abci.types.ResponseDeliverTx, + request, + callback, + ); + }), + "name", + { value: "DeliverTx" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.checkTx = function checkTx(request, callback) { + return this.rpcCall( + checkTx, + $root.tendermint.abci.types.RequestCheckTx, + $root.tendermint.abci.types.ResponseCheckTx, + request, + callback, + ); + }), + "name", + { value: "CheckTx" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.query = function query(request, callback) { + return this.rpcCall( + query, + $root.tendermint.abci.types.RequestQuery, + $root.tendermint.abci.types.ResponseQuery, + request, + callback, + ); + }), + "name", + { value: "Query" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.commit = function commit(request, callback) { + return this.rpcCall( + commit, + $root.tendermint.abci.types.RequestCommit, + $root.tendermint.abci.types.ResponseCommit, + request, + callback, + ); + }), + "name", + { value: "Commit" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.initChain = function initChain(request, callback) { + return this.rpcCall( + initChain, + $root.tendermint.abci.types.RequestInitChain, + $root.tendermint.abci.types.ResponseInitChain, + request, + callback, + ); + }), + "name", + { value: "InitChain" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.beginBlock = function beginBlock(request, callback) { + return this.rpcCall( + beginBlock, + $root.tendermint.abci.types.RequestBeginBlock, + $root.tendermint.abci.types.ResponseBeginBlock, + request, + callback, + ); + }), + "name", + { value: "BeginBlock" }, + ); + Object.defineProperty( + (ABCIApplication.prototype.endBlock = function endBlock(request, callback) { + return this.rpcCall( + endBlock, + $root.tendermint.abci.types.RequestEndBlock, + $root.tendermint.abci.types.ResponseEndBlock, + request, + callback, + ); + }), + "name", + { value: "EndBlock" }, + ); + return ABCIApplication; + })(); + return types; + })(); + return abci; + })(); + tendermint.crypto = (function () { + var crypto = {}; + crypto.merkle = (function () { + var merkle = {}; + merkle.ProofOp = (function () { + function ProofOp(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]]; + } + ProofOp.prototype.type = ""; + ProofOp.prototype.key = $util.newBuffer([]); + ProofOp.prototype.data = $util.newBuffer([]); + ProofOp.create = function create(properties) { + return new ProofOp(properties); + }; + ProofOp.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.type != null && Object.hasOwnProperty.call(m, "type")) w.uint32(10).string(m.type); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(18).bytes(m.key); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) w.uint32(26).bytes(m.data); + return w; + }; + ProofOp.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.tendermint.crypto.merkle.ProofOp(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.type = r.string(); + break; + case 2: + m.key = r.bytes(); + break; + case 3: + m.data = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return ProofOp; + })(); + merkle.Proof = (function () { + function Proof(p) { + this.ops = []; + 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]]; + } + Proof.prototype.ops = $util.emptyArray; + Proof.create = function create(properties) { + return new Proof(properties); + }; + Proof.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.ops != null && m.ops.length) { + for (var i = 0; i < m.ops.length; ++i) + $root.tendermint.crypto.merkle.ProofOp.encode(m.ops[i], w.uint32(10).fork()).ldelim(); + } + return w; + }; + Proof.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.tendermint.crypto.merkle.Proof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.ops && m.ops.length)) m.ops = []; + m.ops.push($root.tendermint.crypto.merkle.ProofOp.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Proof; + })(); + return merkle; + })(); + return crypto; + })(); + tendermint.libs = (function () { + var libs = {}; + libs.kv = (function () { + var kv = {}; + kv.Pair = (function () { + function Pair(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]]; + } + Pair.prototype.key = $util.newBuffer([]); + Pair.prototype.value = $util.newBuffer([]); + Pair.create = function create(properties) { + return new Pair(properties); + }; + Pair.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(10).bytes(m.key); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) w.uint32(18).bytes(m.value); + return w; + }; + Pair.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.tendermint.libs.kv.Pair(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.key = r.bytes(); + break; + case 2: + m.value = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Pair; + })(); + kv.KI64Pair = (function () { + function KI64Pair(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]]; + } + KI64Pair.prototype.key = $util.newBuffer([]); + KI64Pair.prototype.value = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + KI64Pair.create = function create(properties) { + return new KI64Pair(properties); + }; + KI64Pair.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) w.uint32(10).bytes(m.key); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) w.uint32(16).int64(m.value); + return w; + }; + KI64Pair.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.tendermint.libs.kv.KI64Pair(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.key = r.bytes(); + break; + case 2: + m.value = r.int64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return KI64Pair; + })(); + return kv; + })(); + return libs; + })(); + return tendermint; +})(); +$root.google = (function () { + var google = {}; + google.protobuf = (function () { + var protobuf = {}; + protobuf.Any = (function () { + function Any(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]]; + } + Any.prototype.type_url = ""; + Any.prototype.value = $util.newBuffer([]); + Any.create = function create(properties) { + return new Any(properties); + }; + Any.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.type_url != null && Object.hasOwnProperty.call(m, "type_url")) w.uint32(10).string(m.type_url); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) w.uint32(18).bytes(m.value); + return w; + }; + Any.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.google.protobuf.Any(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.type_url = r.string(); + break; + case 2: + m.value = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Any; + })(); + protobuf.Timestamp = (function () { + function Timestamp(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]]; + } + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + Timestamp.prototype.nanos = 0; + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + Timestamp.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.seconds != null && Object.hasOwnProperty.call(m, "seconds")) w.uint32(8).int64(m.seconds); + if (m.nanos != null && Object.hasOwnProperty.call(m, "nanos")) w.uint32(16).int32(m.nanos); + return w; + }; + Timestamp.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.google.protobuf.Timestamp(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.seconds = r.int64(); + break; + case 2: + m.nanos = r.int32(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Timestamp; + })(); + protobuf.Duration = (function () { + function Duration(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]]; + } + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + Duration.prototype.nanos = 0; + Duration.create = function create(properties) { + return new Duration(properties); + }; + Duration.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.seconds != null && Object.hasOwnProperty.call(m, "seconds")) w.uint32(8).int64(m.seconds); + if (m.nanos != null && Object.hasOwnProperty.call(m, "nanos")) w.uint32(16).int32(m.nanos); + return w; + }; + Duration.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.google.protobuf.Duration(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.seconds = r.int64(); + break; + case 2: + m.nanos = r.int32(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Duration; + })(); + return protobuf; + })(); + return google; +})(); +module.exports = $root; diff --git a/packages/demo-protobuf/src/registry.spec.ts b/packages/demo-protobuf/src/registry.spec.ts new file mode 100644 index 00000000..c45ecb98 --- /dev/null +++ b/packages/demo-protobuf/src/registry.spec.ts @@ -0,0 +1,88 @@ +/* eslint-disable @typescript-eslint/camelcase */ +import { assert } from "@cosmjs/utils"; + +import { MsgDemo as MsgDemoType } from "./demo"; +import { cosmos_sdk as cosmosSdk } from "./generated/codecimpl"; +import { Registry } from "./registry"; + +type MsgDemo = { + readonly example: string; +}; + +describe("registry demo", () => { + it("works with a default msg", () => { + const registry = new Registry(); + const Coin = registry.lookupType("/cosmos.Coin")!; + const MsgSend = registry.lookupType("/cosmos.bank.MsgSend")!; + const TxBody = registry.lookupType("/cosmos.tx.TxBody")!; + const Any = registry.lookupType("/google.protobuf.Any")!; + + const coin = Coin.create({ + denom: "ucosm", + amount: "1234567890", + }); + const msgSend = (MsgSend.create({ + 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; + const msgSendBytes = MsgSend.encode(msgSend).finish(); + const msgSendWrapped = Any.create({ + type_url: "/cosmos.bank.MsgSend", + value: msgSendBytes, + }); + const txBody = TxBody.create({ + messages: [msgSendWrapped], + memo: "Some memo", + timeoutHeight: 9999, + extensionOptions: [], + }); + const txBodyBytes = TxBody.encode(txBody).finish(); + + const txBodyDecoded = TxBody.decode(txBodyBytes); + const msg = txBodyDecoded.messages[0]; + assert(msg.type_url); + assert(msg.value); + + const decoder = registry.lookupType(msg.type_url)!; + const msgSendDecoded = decoder.decode(msg.value); + + // fromAddress and toAddress are now Buffers + expect(Uint8Array.from(msgSendDecoded.fromAddress)).toEqual(msgSend.fromAddress); + expect(Uint8Array.from(msgSendDecoded.toAddress)).toEqual(msgSend.toAddress); + expect(msgSendDecoded.amount).toEqual(msgSend.amount); + }); + + it("works with a custom msg", () => { + const typeUrl = "/demo.MsgDemo"; + const registry = new Registry([[typeUrl, MsgDemoType]]); + const MsgDemo = registry.lookupType(typeUrl)!; + const TxBody = registry.lookupType("/cosmos.tx.TxBody")!; + const Any = registry.lookupType("/google.protobuf.Any")!; + + const msgDemo = MsgDemo.create({ + example: "Some example text", + }); + const msgDemoBytes = MsgDemo.encode(msgDemo).finish(); + const msgDemoWrapped = Any.create({ + type_url: typeUrl, + value: msgDemoBytes, + }); + const txBody = TxBody.create({ + messages: [msgDemoWrapped], + memo: "Some memo", + timeoutHeight: 9999, + extensionOptions: [], + }); + const txBodyBytes = TxBody.encode(txBody).finish(); + + const txBodyDecoded = TxBody.decode(txBodyBytes); + const msg = txBodyDecoded.messages[0]; + assert(msg.type_url); + assert(msg.value); + + const decoder = registry.lookupType(msg.type_url)!; + const msgDemoDecoded = decoder.decode(msg.value); + expect(msgDemoDecoded.example).toEqual(msgDemo.example); + }); +}); diff --git a/packages/demo-protobuf/src/registry.ts b/packages/demo-protobuf/src/registry.ts new file mode 100644 index 00000000..b826bf70 --- /dev/null +++ b/packages/demo-protobuf/src/registry.ts @@ -0,0 +1,31 @@ +import protobuf from "protobufjs"; + +import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; + +export interface GeneratedType { + readonly create: (properties?: { [k: string]: any }) => any; + readonly encode: (message: any | { [k: string]: any }, writer?: protobuf.Writer) => protobuf.Writer; + readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => any; +} + +export class Registry { + private readonly types: Map; + + constructor(customTypes: Iterable<[string, GeneratedType]> = []) { + this.types = new Map([ + ["/cosmos.Coin", cosmosSdk.v1.Coin], + ["/cosmos.bank.MsgSend", cosmosSdk.x.bank.v1.MsgSend], + ["/cosmos.tx.TxBody", cosmosSdk.tx.v1.TxBody], + ["/google.protobuf.Any", google.protobuf.Any], + ...customTypes, + ]); + } + + public register(name: string, type: GeneratedType): void { + this.types.set(name, type); + } + + public lookupType(name: string): GeneratedType | undefined { + return this.types.get(name); + } +} diff --git a/packages/demo-protobuf/tsconfig.json b/packages/demo-protobuf/tsconfig.json new file mode 100644 index 00000000..996a40f8 --- /dev/null +++ b/packages/demo-protobuf/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "build", + "declarationDir": "build/types", + "experimentalDecorators": true, + "rootDir": "src" + }, + "include": ["src/**/*"] +} diff --git a/packages/demo-protobuf/typedoc.js b/packages/demo-protobuf/typedoc.js new file mode 100644 index 00000000..e2387c7d --- /dev/null +++ b/packages/demo-protobuf/typedoc.js @@ -0,0 +1,14 @@ +const packageJson = require("./package.json"); + +module.exports = { + src: ["./src"], + out: "docs", + exclude: "**/*.spec.ts", + target: "es6", + name: `${packageJson.name} Documentation`, + readme: "README.md", + mode: "file", + excludeExternals: true, + excludeNotExported: true, + excludePrivate: true, +}; diff --git a/packages/demo-protobuf/types/decorator.d.ts b/packages/demo-protobuf/types/decorator.d.ts new file mode 100644 index 00000000..dd9dbd94 --- /dev/null +++ b/packages/demo-protobuf/types/decorator.d.ts @@ -0,0 +1,12 @@ +import { Constructor, Message, TypeDecorator } from "protobufjs"; +import { Registry } from "./registry"; +export declare function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator; +export declare const CosmosField: { + Boolean: (id: number) => import("protobufjs").FieldDecorator; + String: (id: number) => import("protobufjs").FieldDecorator; + Bytes: (id: number) => import("protobufjs").FieldDecorator; + Int64: (id: number) => import("protobufjs").FieldDecorator; + Uint64: (id: number) => import("protobufjs").FieldDecorator; + RepeatedString: (id: number) => import("protobufjs").FieldDecorator; + Nested: (id: number, ctor: Constructor>) => import("protobufjs").FieldDecorator; +}; diff --git a/packages/demo-protobuf/types/demo.d.ts b/packages/demo-protobuf/types/demo.d.ts new file mode 100644 index 00000000..3cacd8ff --- /dev/null +++ b/packages/demo-protobuf/types/demo.d.ts @@ -0,0 +1,4 @@ +import { Type } from "protobufjs"; +export declare const MsgDemo: Type; +declare const root: import("protobufjs").Namespace; +export default root; diff --git a/packages/demo-protobuf/types/demo.proto.d.ts b/packages/demo-protobuf/types/demo.proto.d.ts new file mode 100644 index 00000000..2cad5e4f --- /dev/null +++ b/packages/demo-protobuf/types/demo.proto.d.ts @@ -0,0 +1,2 @@ +declare const proto: string; +export default proto; diff --git a/packages/demo-protobuf/types/generated/codecimpl.d.ts b/packages/demo-protobuf/types/generated/codecimpl.d.ts new file mode 100644 index 00000000..8ae30088 --- /dev/null +++ b/packages/demo-protobuf/types/generated/codecimpl.d.ts @@ -0,0 +1,4699 @@ +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; + + /** 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; + } + } + } + } + + /** 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; + } + } + + /** 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; + } + } + + /** 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, + } + } + } + } + + /** Namespace crypto. */ + namespace crypto { + /** Namespace v1. */ + namespace v1 { + /** Properties of a PublicKey. */ + interface IPublicKey { + /** PublicKey secp256k1 */ + secp256k1?: Uint8Array | null; + + /** PublicKey ed25519 */ + ed25519?: Uint8Array | null; + + /** PublicKey sr25519 */ + sr25519?: Uint8Array | null; + + /** PublicKey multisig */ + multisig?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold | null; + + /** PublicKey secp256r1 */ + secp256r1?: Uint8Array | 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_sdk.crypto.v1.IPublicKey); + + /** 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"; + + /** + * Creates a new PublicKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKey instance + */ + public static create(properties?: cosmos_sdk.crypto.v1.IPublicKey): cosmos_sdk.crypto.v1.PublicKey; + + /** + * 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 + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: cosmos_sdk.crypto.v1.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_sdk.crypto.v1.PublicKey; + } + + /** Properties of a PubKeyMultisigThreshold. */ + interface IPubKeyMultisigThreshold { + /** PubKeyMultisigThreshold threshold */ + threshold?: number | null; + + /** PubKeyMultisigThreshold publicKeys */ + publicKeys?: cosmos_sdk.crypto.v1.IPublicKey[] | null; + } + + /** Represents a PubKeyMultisigThreshold. */ + class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** + * Constructs a new PubKeyMultisigThreshold. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + + /** PubKeyMultisigThreshold threshold. */ + public threshold: number; + + /** PubKeyMultisigThreshold publicKeys. */ + public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; + + /** + * Creates a new PubKeyMultisigThreshold instance using the specified properties. + * @param [properties] Properties to set + * @returns PubKeyMultisigThreshold instance + */ + public static create( + properties?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, + ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + + /** + * 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 + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: cosmos_sdk.crypto.v1.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_sdk.crypto.v1.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_sdk.crypto.v1.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_sdk.crypto.v1.IMultiSignature, + ): cosmos_sdk.crypto.v1.MultiSignature; + + /** + * 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; + + /** + * 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; + } + + /** 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_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 tendermint. */ +export namespace tendermint { + /** Namespace abci. */ + namespace abci { + /** Namespace types. */ + namespace types { + /** Properties of a Request. */ + interface IRequest { + /** Request echo */ + echo?: tendermint.abci.types.IRequestEcho | null; + + /** Request flush */ + flush?: tendermint.abci.types.IRequestFlush | null; + + /** Request info */ + info?: tendermint.abci.types.IRequestInfo | null; + + /** Request setOption */ + setOption?: tendermint.abci.types.IRequestSetOption | null; + + /** Request initChain */ + initChain?: tendermint.abci.types.IRequestInitChain | null; + + /** Request query */ + query?: tendermint.abci.types.IRequestQuery | null; + + /** Request beginBlock */ + beginBlock?: tendermint.abci.types.IRequestBeginBlock | null; + + /** Request checkTx */ + checkTx?: tendermint.abci.types.IRequestCheckTx | null; + + /** Request deliverTx */ + deliverTx?: tendermint.abci.types.IRequestDeliverTx | null; + + /** Request endBlock */ + endBlock?: tendermint.abci.types.IRequestEndBlock | null; + + /** Request commit */ + commit?: tendermint.abci.types.IRequestCommit | null; + } + + /** Represents a Request. */ + class Request implements IRequest { + /** + * Constructs a new Request. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequest); + + /** Request echo. */ + public echo?: tendermint.abci.types.IRequestEcho | null; + + /** Request flush. */ + public flush?: tendermint.abci.types.IRequestFlush | null; + + /** Request info. */ + public info?: tendermint.abci.types.IRequestInfo | null; + + /** Request setOption. */ + public setOption?: tendermint.abci.types.IRequestSetOption | null; + + /** Request initChain. */ + public initChain?: tendermint.abci.types.IRequestInitChain | null; + + /** Request query. */ + public query?: tendermint.abci.types.IRequestQuery | null; + + /** Request beginBlock. */ + public beginBlock?: tendermint.abci.types.IRequestBeginBlock | null; + + /** Request checkTx. */ + public checkTx?: tendermint.abci.types.IRequestCheckTx | null; + + /** Request deliverTx. */ + public deliverTx?: tendermint.abci.types.IRequestDeliverTx | null; + + /** Request endBlock. */ + public endBlock?: tendermint.abci.types.IRequestEndBlock | null; + + /** Request commit. */ + public commit?: tendermint.abci.types.IRequestCommit | null; + + /** Request value. */ + public value?: + | "echo" + | "flush" + | "info" + | "setOption" + | "initChain" + | "query" + | "beginBlock" + | "checkTx" + | "deliverTx" + | "endBlock" + | "commit"; + + /** + * Creates a new Request instance using the specified properties. + * @param [properties] Properties to set + * @returns Request instance + */ + public static create(properties?: tendermint.abci.types.IRequest): tendermint.abci.types.Request; + + /** + * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. + * @param m Request message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequest, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Request message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Request + * @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): tendermint.abci.types.Request; + } + + /** Properties of a RequestEcho. */ + interface IRequestEcho { + /** RequestEcho message */ + message?: string | null; + } + + /** Represents a RequestEcho. */ + class RequestEcho implements IRequestEcho { + /** + * Constructs a new RequestEcho. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestEcho); + + /** RequestEcho message. */ + public message: string; + + /** + * Creates a new RequestEcho instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestEcho instance + */ + public static create( + properties?: tendermint.abci.types.IRequestEcho, + ): tendermint.abci.types.RequestEcho; + + /** + * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. + * @param m RequestEcho message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestEcho, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestEcho message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestEcho + * @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): tendermint.abci.types.RequestEcho; + } + + /** Properties of a RequestFlush. */ + interface IRequestFlush {} + + /** Represents a RequestFlush. */ + class RequestFlush implements IRequestFlush { + /** + * Constructs a new RequestFlush. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestFlush); + + /** + * Creates a new RequestFlush instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestFlush instance + */ + public static create( + properties?: tendermint.abci.types.IRequestFlush, + ): tendermint.abci.types.RequestFlush; + + /** + * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. + * @param m RequestFlush message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestFlush, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestFlush message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestFlush + * @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, + ): tendermint.abci.types.RequestFlush; + } + + /** Properties of a RequestInfo. */ + interface IRequestInfo { + /** RequestInfo version */ + version?: string | null; + + /** RequestInfo blockVersion */ + blockVersion?: number | Long | null; + + /** RequestInfo p2pVersion */ + p2pVersion?: number | Long | null; + } + + /** Represents a RequestInfo. */ + class RequestInfo implements IRequestInfo { + /** + * Constructs a new RequestInfo. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestInfo); + + /** RequestInfo version. */ + public version: string; + + /** RequestInfo blockVersion. */ + public blockVersion: number | Long; + + /** RequestInfo p2pVersion. */ + public p2pVersion: number | Long; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestInfo instance + */ + public static create( + properties?: tendermint.abci.types.IRequestInfo, + ): tendermint.abci.types.RequestInfo; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. + * @param m RequestInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestInfo + * @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): tendermint.abci.types.RequestInfo; + } + + /** Properties of a RequestSetOption. */ + interface IRequestSetOption { + /** RequestSetOption key */ + key?: string | null; + + /** RequestSetOption value */ + value?: string | null; + } + + /** Represents a RequestSetOption. */ + class RequestSetOption implements IRequestSetOption { + /** + * Constructs a new RequestSetOption. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestSetOption); + + /** RequestSetOption key. */ + public key: string; + + /** RequestSetOption value. */ + public value: string; + + /** + * Creates a new RequestSetOption instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestSetOption instance + */ + public static create( + properties?: tendermint.abci.types.IRequestSetOption, + ): tendermint.abci.types.RequestSetOption; + + /** + * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. + * @param m RequestSetOption message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestSetOption, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestSetOption + * @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, + ): tendermint.abci.types.RequestSetOption; + } + + /** Properties of a RequestInitChain. */ + interface IRequestInitChain { + /** RequestInitChain time */ + time?: google.protobuf.ITimestamp | null; + + /** RequestInitChain chainId */ + chainId?: string | null; + + /** RequestInitChain consensusParams */ + consensusParams?: tendermint.abci.types.IConsensusParams | null; + + /** RequestInitChain validators */ + validators?: tendermint.abci.types.IValidatorUpdate[] | null; + + /** RequestInitChain appStateBytes */ + appStateBytes?: Uint8Array | null; + } + + /** Represents a RequestInitChain. */ + class RequestInitChain implements IRequestInitChain { + /** + * Constructs a new RequestInitChain. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestInitChain); + + /** RequestInitChain time. */ + public time?: google.protobuf.ITimestamp | null; + + /** RequestInitChain chainId. */ + public chainId: string; + + /** RequestInitChain consensusParams. */ + public consensusParams?: tendermint.abci.types.IConsensusParams | null; + + /** RequestInitChain validators. */ + public validators: tendermint.abci.types.IValidatorUpdate[]; + + /** RequestInitChain appStateBytes. */ + public appStateBytes: Uint8Array; + + /** + * Creates a new RequestInitChain instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestInitChain instance + */ + public static create( + properties?: tendermint.abci.types.IRequestInitChain, + ): tendermint.abci.types.RequestInitChain; + + /** + * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. + * @param m RequestInitChain message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestInitChain, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestInitChain + * @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, + ): tendermint.abci.types.RequestInitChain; + } + + /** Properties of a RequestQuery. */ + interface IRequestQuery { + /** RequestQuery data */ + data?: Uint8Array | null; + + /** RequestQuery path */ + path?: string | null; + + /** RequestQuery height */ + height?: number | Long | null; + + /** RequestQuery prove */ + prove?: boolean | null; + } + + /** Represents a RequestQuery. */ + class RequestQuery implements IRequestQuery { + /** + * Constructs a new RequestQuery. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestQuery); + + /** RequestQuery data. */ + public data: Uint8Array; + + /** RequestQuery path. */ + public path: string; + + /** RequestQuery height. */ + public height: number | Long; + + /** RequestQuery prove. */ + public prove: boolean; + + /** + * Creates a new RequestQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestQuery instance + */ + public static create( + properties?: tendermint.abci.types.IRequestQuery, + ): tendermint.abci.types.RequestQuery; + + /** + * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. + * @param m RequestQuery message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestQuery, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestQuery message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestQuery + * @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, + ): tendermint.abci.types.RequestQuery; + } + + /** Properties of a RequestBeginBlock. */ + interface IRequestBeginBlock { + /** RequestBeginBlock hash */ + hash?: Uint8Array | null; + + /** RequestBeginBlock header */ + header?: tendermint.abci.types.IHeader | null; + + /** RequestBeginBlock lastCommitInfo */ + lastCommitInfo?: tendermint.abci.types.ILastCommitInfo | null; + + /** RequestBeginBlock byzantineValidators */ + byzantineValidators?: tendermint.abci.types.IEvidence[] | null; + } + + /** Represents a RequestBeginBlock. */ + class RequestBeginBlock implements IRequestBeginBlock { + /** + * Constructs a new RequestBeginBlock. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestBeginBlock); + + /** RequestBeginBlock hash. */ + public hash: Uint8Array; + + /** RequestBeginBlock header. */ + public header?: tendermint.abci.types.IHeader | null; + + /** RequestBeginBlock lastCommitInfo. */ + public lastCommitInfo?: tendermint.abci.types.ILastCommitInfo | null; + + /** RequestBeginBlock byzantineValidators. */ + public byzantineValidators: tendermint.abci.types.IEvidence[]; + + /** + * Creates a new RequestBeginBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestBeginBlock instance + */ + public static create( + properties?: tendermint.abci.types.IRequestBeginBlock, + ): tendermint.abci.types.RequestBeginBlock; + + /** + * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. + * @param m RequestBeginBlock message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestBeginBlock, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestBeginBlock + * @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, + ): tendermint.abci.types.RequestBeginBlock; + } + + /** CheckTxType enum. */ + enum CheckTxType { + New = 0, + Recheck = 1, + } + + /** Properties of a RequestCheckTx. */ + interface IRequestCheckTx { + /** RequestCheckTx tx */ + tx?: Uint8Array | null; + + /** RequestCheckTx type */ + type?: tendermint.abci.types.CheckTxType | null; + } + + /** Represents a RequestCheckTx. */ + class RequestCheckTx implements IRequestCheckTx { + /** + * Constructs a new RequestCheckTx. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestCheckTx); + + /** RequestCheckTx tx. */ + public tx: Uint8Array; + + /** RequestCheckTx type. */ + public type: tendermint.abci.types.CheckTxType; + + /** + * Creates a new RequestCheckTx instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestCheckTx instance + */ + public static create( + properties?: tendermint.abci.types.IRequestCheckTx, + ): tendermint.abci.types.RequestCheckTx; + + /** + * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. + * @param m RequestCheckTx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestCheckTx, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestCheckTx + * @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, + ): tendermint.abci.types.RequestCheckTx; + } + + /** Properties of a RequestDeliverTx. */ + interface IRequestDeliverTx { + /** RequestDeliverTx tx */ + tx?: Uint8Array | null; + } + + /** Represents a RequestDeliverTx. */ + class RequestDeliverTx implements IRequestDeliverTx { + /** + * Constructs a new RequestDeliverTx. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestDeliverTx); + + /** RequestDeliverTx tx. */ + public tx: Uint8Array; + + /** + * Creates a new RequestDeliverTx instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestDeliverTx instance + */ + public static create( + properties?: tendermint.abci.types.IRequestDeliverTx, + ): tendermint.abci.types.RequestDeliverTx; + + /** + * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. + * @param m RequestDeliverTx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestDeliverTx, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestDeliverTx + * @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, + ): tendermint.abci.types.RequestDeliverTx; + } + + /** Properties of a RequestEndBlock. */ + interface IRequestEndBlock { + /** RequestEndBlock height */ + height?: number | Long | null; + } + + /** Represents a RequestEndBlock. */ + class RequestEndBlock implements IRequestEndBlock { + /** + * Constructs a new RequestEndBlock. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestEndBlock); + + /** RequestEndBlock height. */ + public height: number | Long; + + /** + * Creates a new RequestEndBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestEndBlock instance + */ + public static create( + properties?: tendermint.abci.types.IRequestEndBlock, + ): tendermint.abci.types.RequestEndBlock; + + /** + * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. + * @param m RequestEndBlock message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IRequestEndBlock, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestEndBlock + * @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, + ): tendermint.abci.types.RequestEndBlock; + } + + /** Properties of a RequestCommit. */ + interface IRequestCommit {} + + /** Represents a RequestCommit. */ + class RequestCommit implements IRequestCommit { + /** + * Constructs a new RequestCommit. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IRequestCommit); + + /** + * Creates a new RequestCommit instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestCommit instance + */ + public static create( + properties?: tendermint.abci.types.IRequestCommit, + ): tendermint.abci.types.RequestCommit; + + /** + * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. + * @param m RequestCommit message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IRequestCommit, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestCommit message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns RequestCommit + * @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, + ): tendermint.abci.types.RequestCommit; + } + + /** Properties of a Response. */ + interface IResponse { + /** Response exception */ + exception?: tendermint.abci.types.IResponseException | null; + + /** Response echo */ + echo?: tendermint.abci.types.IResponseEcho | null; + + /** Response flush */ + flush?: tendermint.abci.types.IResponseFlush | null; + + /** Response info */ + info?: tendermint.abci.types.IResponseInfo | null; + + /** Response setOption */ + setOption?: tendermint.abci.types.IResponseSetOption | null; + + /** Response initChain */ + initChain?: tendermint.abci.types.IResponseInitChain | null; + + /** Response query */ + query?: tendermint.abci.types.IResponseQuery | null; + + /** Response beginBlock */ + beginBlock?: tendermint.abci.types.IResponseBeginBlock | null; + + /** Response checkTx */ + checkTx?: tendermint.abci.types.IResponseCheckTx | null; + + /** Response deliverTx */ + deliverTx?: tendermint.abci.types.IResponseDeliverTx | null; + + /** Response endBlock */ + endBlock?: tendermint.abci.types.IResponseEndBlock | null; + + /** Response commit */ + commit?: tendermint.abci.types.IResponseCommit | null; + } + + /** Represents a Response. */ + class Response implements IResponse { + /** + * Constructs a new Response. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponse); + + /** Response exception. */ + public exception?: tendermint.abci.types.IResponseException | null; + + /** Response echo. */ + public echo?: tendermint.abci.types.IResponseEcho | null; + + /** Response flush. */ + public flush?: tendermint.abci.types.IResponseFlush | null; + + /** Response info. */ + public info?: tendermint.abci.types.IResponseInfo | null; + + /** Response setOption. */ + public setOption?: tendermint.abci.types.IResponseSetOption | null; + + /** Response initChain. */ + public initChain?: tendermint.abci.types.IResponseInitChain | null; + + /** Response query. */ + public query?: tendermint.abci.types.IResponseQuery | null; + + /** Response beginBlock. */ + public beginBlock?: tendermint.abci.types.IResponseBeginBlock | null; + + /** Response checkTx. */ + public checkTx?: tendermint.abci.types.IResponseCheckTx | null; + + /** Response deliverTx. */ + public deliverTx?: tendermint.abci.types.IResponseDeliverTx | null; + + /** Response endBlock. */ + public endBlock?: tendermint.abci.types.IResponseEndBlock | null; + + /** Response commit. */ + public commit?: tendermint.abci.types.IResponseCommit | null; + + /** Response value. */ + public value?: + | "exception" + | "echo" + | "flush" + | "info" + | "setOption" + | "initChain" + | "query" + | "beginBlock" + | "checkTx" + | "deliverTx" + | "endBlock" + | "commit"; + + /** + * Creates a new Response instance using the specified properties. + * @param [properties] Properties to set + * @returns Response instance + */ + public static create(properties?: tendermint.abci.types.IResponse): tendermint.abci.types.Response; + + /** + * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. + * @param m Response message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponse, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Response message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Response + * @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): tendermint.abci.types.Response; + } + + /** Properties of a ResponseException. */ + interface IResponseException { + /** ResponseException error */ + error?: string | null; + } + + /** Represents a ResponseException. */ + class ResponseException implements IResponseException { + /** + * Constructs a new ResponseException. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseException); + + /** ResponseException error. */ + public error: string; + + /** + * Creates a new ResponseException instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseException instance + */ + public static create( + properties?: tendermint.abci.types.IResponseException, + ): tendermint.abci.types.ResponseException; + + /** + * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. + * @param m ResponseException message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseException, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseException message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseException + * @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, + ): tendermint.abci.types.ResponseException; + } + + /** Properties of a ResponseEcho. */ + interface IResponseEcho { + /** ResponseEcho message */ + message?: string | null; + } + + /** Represents a ResponseEcho. */ + class ResponseEcho implements IResponseEcho { + /** + * Constructs a new ResponseEcho. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseEcho); + + /** ResponseEcho message. */ + public message: string; + + /** + * Creates a new ResponseEcho instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseEcho instance + */ + public static create( + properties?: tendermint.abci.types.IResponseEcho, + ): tendermint.abci.types.ResponseEcho; + + /** + * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. + * @param m ResponseEcho message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponseEcho, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseEcho + * @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, + ): tendermint.abci.types.ResponseEcho; + } + + /** Properties of a ResponseFlush. */ + interface IResponseFlush {} + + /** Represents a ResponseFlush. */ + class ResponseFlush implements IResponseFlush { + /** + * Constructs a new ResponseFlush. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseFlush); + + /** + * Creates a new ResponseFlush instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseFlush instance + */ + public static create( + properties?: tendermint.abci.types.IResponseFlush, + ): tendermint.abci.types.ResponseFlush; + + /** + * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. + * @param m ResponseFlush message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponseFlush, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseFlush + * @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, + ): tendermint.abci.types.ResponseFlush; + } + + /** Properties of a ResponseInfo. */ + interface IResponseInfo { + /** ResponseInfo data */ + data?: string | null; + + /** ResponseInfo version */ + version?: string | null; + + /** ResponseInfo appVersion */ + appVersion?: number | Long | null; + + /** ResponseInfo lastBlockHeight */ + lastBlockHeight?: number | Long | null; + + /** ResponseInfo lastBlockAppHash */ + lastBlockAppHash?: Uint8Array | null; + } + + /** Represents a ResponseInfo. */ + class ResponseInfo implements IResponseInfo { + /** + * Constructs a new ResponseInfo. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseInfo); + + /** ResponseInfo data. */ + public data: string; + + /** ResponseInfo version. */ + public version: string; + + /** ResponseInfo appVersion. */ + public appVersion: number | Long; + + /** ResponseInfo lastBlockHeight. */ + public lastBlockHeight: number | Long; + + /** ResponseInfo lastBlockAppHash. */ + public lastBlockAppHash: Uint8Array; + + /** + * Creates a new ResponseInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseInfo instance + */ + public static create( + properties?: tendermint.abci.types.IResponseInfo, + ): tendermint.abci.types.ResponseInfo; + + /** + * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. + * @param m ResponseInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponseInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseInfo + * @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, + ): tendermint.abci.types.ResponseInfo; + } + + /** Properties of a ResponseSetOption. */ + interface IResponseSetOption { + /** ResponseSetOption code */ + code?: number | null; + + /** ResponseSetOption log */ + log?: string | null; + + /** ResponseSetOption info */ + info?: string | null; + } + + /** Represents a ResponseSetOption. */ + class ResponseSetOption implements IResponseSetOption { + /** + * Constructs a new ResponseSetOption. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseSetOption); + + /** ResponseSetOption code. */ + public code: number; + + /** ResponseSetOption log. */ + public log: string; + + /** ResponseSetOption info. */ + public info: string; + + /** + * Creates a new ResponseSetOption instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseSetOption instance + */ + public static create( + properties?: tendermint.abci.types.IResponseSetOption, + ): tendermint.abci.types.ResponseSetOption; + + /** + * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. + * @param m ResponseSetOption message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseSetOption, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseSetOption + * @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, + ): tendermint.abci.types.ResponseSetOption; + } + + /** Properties of a ResponseInitChain. */ + interface IResponseInitChain { + /** ResponseInitChain consensusParams */ + consensusParams?: tendermint.abci.types.IConsensusParams | null; + + /** ResponseInitChain validators */ + validators?: tendermint.abci.types.IValidatorUpdate[] | null; + } + + /** Represents a ResponseInitChain. */ + class ResponseInitChain implements IResponseInitChain { + /** + * Constructs a new ResponseInitChain. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseInitChain); + + /** ResponseInitChain consensusParams. */ + public consensusParams?: tendermint.abci.types.IConsensusParams | null; + + /** ResponseInitChain validators. */ + public validators: tendermint.abci.types.IValidatorUpdate[]; + + /** + * Creates a new ResponseInitChain instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseInitChain instance + */ + public static create( + properties?: tendermint.abci.types.IResponseInitChain, + ): tendermint.abci.types.ResponseInitChain; + + /** + * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. + * @param m ResponseInitChain message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseInitChain, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseInitChain + * @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, + ): tendermint.abci.types.ResponseInitChain; + } + + /** Properties of a ResponseQuery. */ + interface IResponseQuery { + /** ResponseQuery code */ + code?: number | null; + + /** ResponseQuery log */ + log?: string | null; + + /** ResponseQuery info */ + info?: string | null; + + /** ResponseQuery index */ + index?: number | Long | null; + + /** ResponseQuery key */ + key?: Uint8Array | null; + + /** ResponseQuery value */ + value?: Uint8Array | null; + + /** ResponseQuery proof */ + proof?: tendermint.crypto.merkle.IProof | null; + + /** ResponseQuery height */ + height?: number | Long | null; + + /** ResponseQuery codespace */ + codespace?: string | null; + } + + /** Represents a ResponseQuery. */ + class ResponseQuery implements IResponseQuery { + /** + * Constructs a new ResponseQuery. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseQuery); + + /** ResponseQuery code. */ + public code: number; + + /** ResponseQuery log. */ + public log: string; + + /** ResponseQuery info. */ + public info: string; + + /** ResponseQuery index. */ + public index: number | Long; + + /** ResponseQuery key. */ + public key: Uint8Array; + + /** ResponseQuery value. */ + public value: Uint8Array; + + /** ResponseQuery proof. */ + public proof?: tendermint.crypto.merkle.IProof | null; + + /** ResponseQuery height. */ + public height: number | Long; + + /** ResponseQuery codespace. */ + public codespace: string; + + /** + * Creates a new ResponseQuery instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseQuery instance + */ + public static create( + properties?: tendermint.abci.types.IResponseQuery, + ): tendermint.abci.types.ResponseQuery; + + /** + * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. + * @param m ResponseQuery message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IResponseQuery, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseQuery + * @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, + ): tendermint.abci.types.ResponseQuery; + } + + /** Properties of a ResponseBeginBlock. */ + interface IResponseBeginBlock { + /** ResponseBeginBlock events */ + events?: tendermint.abci.types.IEvent[] | null; + } + + /** Represents a ResponseBeginBlock. */ + class ResponseBeginBlock implements IResponseBeginBlock { + /** + * Constructs a new ResponseBeginBlock. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseBeginBlock); + + /** ResponseBeginBlock events. */ + public events: tendermint.abci.types.IEvent[]; + + /** + * Creates a new ResponseBeginBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseBeginBlock instance + */ + public static create( + properties?: tendermint.abci.types.IResponseBeginBlock, + ): tendermint.abci.types.ResponseBeginBlock; + + /** + * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. + * @param m ResponseBeginBlock message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseBeginBlock, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseBeginBlock + * @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, + ): tendermint.abci.types.ResponseBeginBlock; + } + + /** Properties of a ResponseCheckTx. */ + interface IResponseCheckTx { + /** ResponseCheckTx code */ + code?: number | null; + + /** ResponseCheckTx data */ + data?: Uint8Array | null; + + /** ResponseCheckTx log */ + log?: string | null; + + /** ResponseCheckTx info */ + info?: string | null; + + /** ResponseCheckTx gasWanted */ + gasWanted?: number | Long | null; + + /** ResponseCheckTx gasUsed */ + gasUsed?: number | Long | null; + + /** ResponseCheckTx events */ + events?: tendermint.abci.types.IEvent[] | null; + + /** ResponseCheckTx codespace */ + codespace?: string | null; + } + + /** Represents a ResponseCheckTx. */ + class ResponseCheckTx implements IResponseCheckTx { + /** + * Constructs a new ResponseCheckTx. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseCheckTx); + + /** ResponseCheckTx code. */ + public code: number; + + /** ResponseCheckTx data. */ + public data: Uint8Array; + + /** ResponseCheckTx log. */ + public log: string; + + /** ResponseCheckTx info. */ + public info: string; + + /** ResponseCheckTx gasWanted. */ + public gasWanted: number | Long; + + /** ResponseCheckTx gasUsed. */ + public gasUsed: number | Long; + + /** ResponseCheckTx events. */ + public events: tendermint.abci.types.IEvent[]; + + /** ResponseCheckTx codespace. */ + public codespace: string; + + /** + * Creates a new ResponseCheckTx instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseCheckTx instance + */ + public static create( + properties?: tendermint.abci.types.IResponseCheckTx, + ): tendermint.abci.types.ResponseCheckTx; + + /** + * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. + * @param m ResponseCheckTx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseCheckTx, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseCheckTx + * @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, + ): tendermint.abci.types.ResponseCheckTx; + } + + /** Properties of a ResponseDeliverTx. */ + interface IResponseDeliverTx { + /** ResponseDeliverTx code */ + code?: number | null; + + /** ResponseDeliverTx data */ + data?: Uint8Array | null; + + /** ResponseDeliverTx log */ + log?: string | null; + + /** ResponseDeliverTx info */ + info?: string | null; + + /** ResponseDeliverTx gasWanted */ + gasWanted?: number | Long | null; + + /** ResponseDeliverTx gasUsed */ + gasUsed?: number | Long | null; + + /** ResponseDeliverTx events */ + events?: tendermint.abci.types.IEvent[] | null; + + /** ResponseDeliverTx codespace */ + codespace?: string | null; + } + + /** Represents a ResponseDeliverTx. */ + class ResponseDeliverTx implements IResponseDeliverTx { + /** + * Constructs a new ResponseDeliverTx. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseDeliverTx); + + /** ResponseDeliverTx code. */ + public code: number; + + /** ResponseDeliverTx data. */ + public data: Uint8Array; + + /** ResponseDeliverTx log. */ + public log: string; + + /** ResponseDeliverTx info. */ + public info: string; + + /** ResponseDeliverTx gasWanted. */ + public gasWanted: number | Long; + + /** ResponseDeliverTx gasUsed. */ + public gasUsed: number | Long; + + /** ResponseDeliverTx events. */ + public events: tendermint.abci.types.IEvent[]; + + /** ResponseDeliverTx codespace. */ + public codespace: string; + + /** + * Creates a new ResponseDeliverTx instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseDeliverTx instance + */ + public static create( + properties?: tendermint.abci.types.IResponseDeliverTx, + ): tendermint.abci.types.ResponseDeliverTx; + + /** + * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. + * @param m ResponseDeliverTx message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseDeliverTx, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseDeliverTx + * @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, + ): tendermint.abci.types.ResponseDeliverTx; + } + + /** Properties of a ResponseEndBlock. */ + interface IResponseEndBlock { + /** ResponseEndBlock validatorUpdates */ + validatorUpdates?: tendermint.abci.types.IValidatorUpdate[] | null; + + /** ResponseEndBlock consensusParamUpdates */ + consensusParamUpdates?: tendermint.abci.types.IConsensusParams | null; + + /** ResponseEndBlock events */ + events?: tendermint.abci.types.IEvent[] | null; + } + + /** Represents a ResponseEndBlock. */ + class ResponseEndBlock implements IResponseEndBlock { + /** + * Constructs a new ResponseEndBlock. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseEndBlock); + + /** ResponseEndBlock validatorUpdates. */ + public validatorUpdates: tendermint.abci.types.IValidatorUpdate[]; + + /** ResponseEndBlock consensusParamUpdates. */ + public consensusParamUpdates?: tendermint.abci.types.IConsensusParams | null; + + /** ResponseEndBlock events. */ + public events: tendermint.abci.types.IEvent[]; + + /** + * Creates a new ResponseEndBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseEndBlock instance + */ + public static create( + properties?: tendermint.abci.types.IResponseEndBlock, + ): tendermint.abci.types.ResponseEndBlock; + + /** + * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. + * @param m ResponseEndBlock message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseEndBlock, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseEndBlock + * @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, + ): tendermint.abci.types.ResponseEndBlock; + } + + /** Properties of a ResponseCommit. */ + interface IResponseCommit { + /** ResponseCommit data */ + data?: Uint8Array | null; + } + + /** Represents a ResponseCommit. */ + class ResponseCommit implements IResponseCommit { + /** + * Constructs a new ResponseCommit. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IResponseCommit); + + /** ResponseCommit data. */ + public data: Uint8Array; + + /** + * Creates a new ResponseCommit instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseCommit instance + */ + public static create( + properties?: tendermint.abci.types.IResponseCommit, + ): tendermint.abci.types.ResponseCommit; + + /** + * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. + * @param m ResponseCommit message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IResponseCommit, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ResponseCommit + * @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, + ): tendermint.abci.types.ResponseCommit; + } + + /** Properties of a ConsensusParams. */ + interface IConsensusParams { + /** ConsensusParams block */ + block?: tendermint.abci.types.IBlockParams | null; + + /** ConsensusParams evidence */ + evidence?: tendermint.abci.types.IEvidenceParams | null; + + /** ConsensusParams validator */ + validator?: tendermint.abci.types.IValidatorParams | null; + } + + /** Represents a ConsensusParams. */ + class ConsensusParams implements IConsensusParams { + /** + * Constructs a new ConsensusParams. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IConsensusParams); + + /** ConsensusParams block. */ + public block?: tendermint.abci.types.IBlockParams | null; + + /** ConsensusParams evidence. */ + public evidence?: tendermint.abci.types.IEvidenceParams | null; + + /** ConsensusParams validator. */ + public validator?: tendermint.abci.types.IValidatorParams | null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @param [properties] Properties to set + * @returns ConsensusParams instance + */ + public static create( + properties?: tendermint.abci.types.IConsensusParams, + ): tendermint.abci.types.ConsensusParams; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. + * @param m ConsensusParams message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IConsensusParams, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ConsensusParams + * @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, + ): tendermint.abci.types.ConsensusParams; + } + + /** Properties of a BlockParams. */ + interface IBlockParams { + /** BlockParams maxBytes */ + maxBytes?: number | Long | null; + + /** BlockParams maxGas */ + maxGas?: number | Long | null; + } + + /** Represents a BlockParams. */ + class BlockParams implements IBlockParams { + /** + * Constructs a new BlockParams. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IBlockParams); + + /** BlockParams maxBytes. */ + public maxBytes: number | Long; + + /** BlockParams maxGas. */ + public maxGas: number | Long; + + /** + * Creates a new BlockParams instance using the specified properties. + * @param [properties] Properties to set + * @returns BlockParams instance + */ + public static create( + properties?: tendermint.abci.types.IBlockParams, + ): tendermint.abci.types.BlockParams; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. + * @param m BlockParams message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IBlockParams, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns BlockParams + * @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): tendermint.abci.types.BlockParams; + } + + /** Properties of an EvidenceParams. */ + interface IEvidenceParams { + /** EvidenceParams maxAgeNumBlocks */ + maxAgeNumBlocks?: number | Long | null; + + /** EvidenceParams maxAgeDuration */ + maxAgeDuration?: google.protobuf.IDuration | null; + } + + /** Represents an EvidenceParams. */ + class EvidenceParams implements IEvidenceParams { + /** + * Constructs a new EvidenceParams. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IEvidenceParams); + + /** EvidenceParams maxAgeNumBlocks. */ + public maxAgeNumBlocks: number | Long; + + /** EvidenceParams maxAgeDuration. */ + public maxAgeDuration?: google.protobuf.IDuration | null; + + /** + * Creates a new EvidenceParams instance using the specified properties. + * @param [properties] Properties to set + * @returns EvidenceParams instance + */ + public static create( + properties?: tendermint.abci.types.IEvidenceParams, + ): tendermint.abci.types.EvidenceParams; + + /** + * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. + * @param m EvidenceParams message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IEvidenceParams, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns EvidenceParams + * @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, + ): tendermint.abci.types.EvidenceParams; + } + + /** Properties of a ValidatorParams. */ + interface IValidatorParams { + /** ValidatorParams pubKeyTypes */ + pubKeyTypes?: string[] | null; + } + + /** Represents a ValidatorParams. */ + class ValidatorParams implements IValidatorParams { + /** + * Constructs a new ValidatorParams. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IValidatorParams); + + /** ValidatorParams pubKeyTypes. */ + public pubKeyTypes: string[]; + + /** + * Creates a new ValidatorParams instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorParams instance + */ + public static create( + properties?: tendermint.abci.types.IValidatorParams, + ): tendermint.abci.types.ValidatorParams; + + /** + * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. + * @param m ValidatorParams message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IValidatorParams, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorParams + * @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, + ): tendermint.abci.types.ValidatorParams; + } + + /** Properties of a LastCommitInfo. */ + interface ILastCommitInfo { + /** LastCommitInfo round */ + round?: number | null; + + /** LastCommitInfo votes */ + votes?: tendermint.abci.types.IVoteInfo[] | null; + } + + /** Represents a LastCommitInfo. */ + class LastCommitInfo implements ILastCommitInfo { + /** + * Constructs a new LastCommitInfo. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.ILastCommitInfo); + + /** LastCommitInfo round. */ + public round: number; + + /** LastCommitInfo votes. */ + public votes: tendermint.abci.types.IVoteInfo[]; + + /** + * Creates a new LastCommitInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LastCommitInfo instance + */ + public static create( + properties?: tendermint.abci.types.ILastCommitInfo, + ): tendermint.abci.types.LastCommitInfo; + + /** + * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. + * @param m LastCommitInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.ILastCommitInfo, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns LastCommitInfo + * @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, + ): tendermint.abci.types.LastCommitInfo; + } + + /** Properties of an Event. */ + interface IEvent { + /** Event type */ + type?: string | null; + + /** Event attributes */ + attributes?: tendermint.libs.kv.IPair[] | null; + } + + /** Represents an Event. */ + class Event implements IEvent { + /** + * Constructs a new Event. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IEvent); + + /** Event type. */ + public type: string; + + /** Event attributes. */ + public attributes: tendermint.libs.kv.IPair[]; + + /** + * Creates a new Event instance using the specified properties. + * @param [properties] Properties to set + * @returns Event instance + */ + public static create(properties?: tendermint.abci.types.IEvent): tendermint.abci.types.Event; + + /** + * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. + * @param m Event message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IEvent, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Event message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Event + * @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): tendermint.abci.types.Event; + } + + /** Properties of a Header. */ + interface IHeader { + /** Header version */ + version?: tendermint.abci.types.IVersion | null; + + /** Header chainId */ + chainId?: string | null; + + /** Header height */ + height?: number | Long | null; + + /** Header time */ + time?: google.protobuf.ITimestamp | null; + + /** Header lastBlockId */ + lastBlockId?: tendermint.abci.types.IBlockID | null; + + /** Header lastCommitHash */ + lastCommitHash?: Uint8Array | null; + + /** Header dataHash */ + dataHash?: Uint8Array | null; + + /** Header validatorsHash */ + validatorsHash?: Uint8Array | null; + + /** Header nextValidatorsHash */ + nextValidatorsHash?: Uint8Array | null; + + /** Header consensusHash */ + consensusHash?: Uint8Array | null; + + /** Header appHash */ + appHash?: Uint8Array | null; + + /** Header lastResultsHash */ + lastResultsHash?: Uint8Array | null; + + /** Header evidenceHash */ + evidenceHash?: Uint8Array | null; + + /** Header proposerAddress */ + proposerAddress?: Uint8Array | null; + } + + /** Represents a Header. */ + class Header implements IHeader { + /** + * Constructs a new Header. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IHeader); + + /** Header version. */ + public version?: tendermint.abci.types.IVersion | null; + + /** Header chainId. */ + public chainId: string; + + /** Header height. */ + public height: number | Long; + + /** Header time. */ + public time?: google.protobuf.ITimestamp | null; + + /** Header lastBlockId. */ + public lastBlockId?: tendermint.abci.types.IBlockID | null; + + /** Header lastCommitHash. */ + public lastCommitHash: Uint8Array; + + /** Header dataHash. */ + public dataHash: Uint8Array; + + /** Header validatorsHash. */ + public validatorsHash: Uint8Array; + + /** Header nextValidatorsHash. */ + public nextValidatorsHash: Uint8Array; + + /** Header consensusHash. */ + public consensusHash: Uint8Array; + + /** Header appHash. */ + public appHash: Uint8Array; + + /** Header lastResultsHash. */ + public lastResultsHash: Uint8Array; + + /** Header evidenceHash. */ + public evidenceHash: Uint8Array; + + /** Header proposerAddress. */ + public proposerAddress: Uint8Array; + + /** + * Creates a new Header instance using the specified properties. + * @param [properties] Properties to set + * @returns Header instance + */ + public static create(properties?: tendermint.abci.types.IHeader): tendermint.abci.types.Header; + + /** + * Encodes the specified Header message. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. + * @param m Header message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IHeader, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Header message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Header + * @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): tendermint.abci.types.Header; + } + + /** Properties of a Version. */ + interface IVersion { + /** Version Block */ + Block?: number | Long | null; + + /** Version App */ + App?: number | Long | null; + } + + /** Represents a Version. */ + class Version implements IVersion { + /** + * Constructs a new Version. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IVersion); + + /** Version Block. */ + public Block: number | Long; + + /** Version App. */ + public App: number | Long; + + /** + * Creates a new Version instance using the specified properties. + * @param [properties] Properties to set + * @returns Version instance + */ + public static create(properties?: tendermint.abci.types.IVersion): tendermint.abci.types.Version; + + /** + * Encodes the specified Version message. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. + * @param m Version message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IVersion, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Version message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Version + * @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): tendermint.abci.types.Version; + } + + /** Properties of a BlockID. */ + interface IBlockID { + /** BlockID hash */ + hash?: Uint8Array | null; + + /** BlockID partsHeader */ + partsHeader?: tendermint.abci.types.IPartSetHeader | null; + } + + /** Represents a BlockID. */ + class BlockID implements IBlockID { + /** + * Constructs a new BlockID. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IBlockID); + + /** BlockID hash. */ + public hash: Uint8Array; + + /** BlockID partsHeader. */ + public partsHeader?: tendermint.abci.types.IPartSetHeader | null; + + /** + * Creates a new BlockID instance using the specified properties. + * @param [properties] Properties to set + * @returns BlockID instance + */ + public static create(properties?: tendermint.abci.types.IBlockID): tendermint.abci.types.BlockID; + + /** + * Encodes the specified BlockID message. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. + * @param m BlockID message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IBlockID, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlockID message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns BlockID + * @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): tendermint.abci.types.BlockID; + } + + /** Properties of a PartSetHeader. */ + interface IPartSetHeader { + /** PartSetHeader total */ + total?: number | null; + + /** PartSetHeader hash */ + hash?: Uint8Array | null; + } + + /** Represents a PartSetHeader. */ + class PartSetHeader implements IPartSetHeader { + /** + * Constructs a new PartSetHeader. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IPartSetHeader); + + /** PartSetHeader total. */ + public total: number; + + /** PartSetHeader hash. */ + public hash: Uint8Array; + + /** + * Creates a new PartSetHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns PartSetHeader instance + */ + public static create( + properties?: tendermint.abci.types.IPartSetHeader, + ): tendermint.abci.types.PartSetHeader; + + /** + * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. + * @param m PartSetHeader message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IPartSetHeader, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns PartSetHeader + * @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, + ): tendermint.abci.types.PartSetHeader; + } + + /** Properties of a Validator. */ + interface IValidator { + /** Validator address */ + address?: Uint8Array | null; + + /** Validator power */ + power?: number | Long | null; + } + + /** Represents a Validator. */ + class Validator implements IValidator { + /** + * Constructs a new Validator. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IValidator); + + /** Validator address. */ + public address: Uint8Array; + + /** Validator power. */ + public power: number | Long; + + /** + * Creates a new Validator instance using the specified properties. + * @param [properties] Properties to set + * @returns Validator instance + */ + public static create(properties?: tendermint.abci.types.IValidator): tendermint.abci.types.Validator; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. + * @param m Validator message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IValidator, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Validator + * @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): tendermint.abci.types.Validator; + } + + /** Properties of a ValidatorUpdate. */ + interface IValidatorUpdate { + /** ValidatorUpdate pubKey */ + pubKey?: tendermint.abci.types.IPubKey | null; + + /** ValidatorUpdate power */ + power?: number | Long | null; + } + + /** Represents a ValidatorUpdate. */ + class ValidatorUpdate implements IValidatorUpdate { + /** + * Constructs a new ValidatorUpdate. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IValidatorUpdate); + + /** ValidatorUpdate pubKey. */ + public pubKey?: tendermint.abci.types.IPubKey | null; + + /** ValidatorUpdate power. */ + public power: number | Long; + + /** + * Creates a new ValidatorUpdate instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorUpdate instance + */ + public static create( + properties?: tendermint.abci.types.IValidatorUpdate, + ): tendermint.abci.types.ValidatorUpdate; + + /** + * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. + * @param m ValidatorUpdate message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode( + m: tendermint.abci.types.IValidatorUpdate, + w?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ValidatorUpdate + * @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, + ): tendermint.abci.types.ValidatorUpdate; + } + + /** Properties of a VoteInfo. */ + interface IVoteInfo { + /** VoteInfo validator */ + validator?: tendermint.abci.types.IValidator | null; + + /** VoteInfo signedLastBlock */ + signedLastBlock?: boolean | null; + } + + /** Represents a VoteInfo. */ + class VoteInfo implements IVoteInfo { + /** + * Constructs a new VoteInfo. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IVoteInfo); + + /** VoteInfo validator. */ + public validator?: tendermint.abci.types.IValidator | null; + + /** VoteInfo signedLastBlock. */ + public signedLastBlock: boolean; + + /** + * Creates a new VoteInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VoteInfo instance + */ + public static create(properties?: tendermint.abci.types.IVoteInfo): tendermint.abci.types.VoteInfo; + + /** + * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. + * @param m VoteInfo message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IVoteInfo, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VoteInfo message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns VoteInfo + * @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): tendermint.abci.types.VoteInfo; + } + + /** Properties of a PubKey. */ + interface IPubKey { + /** PubKey type */ + type?: string | null; + + /** PubKey data */ + data?: Uint8Array | null; + } + + /** Represents a PubKey. */ + class PubKey implements IPubKey { + /** + * Constructs a new PubKey. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IPubKey); + + /** PubKey type. */ + public type: string; + + /** PubKey data. */ + public data: Uint8Array; + + /** + * Creates a new PubKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PubKey instance + */ + public static create(properties?: tendermint.abci.types.IPubKey): tendermint.abci.types.PubKey; + + /** + * Encodes the specified PubKey message. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. + * @param m PubKey message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IPubKey, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubKey message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns PubKey + * @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): tendermint.abci.types.PubKey; + } + + /** Properties of an Evidence. */ + interface IEvidence { + /** Evidence type */ + type?: string | null; + + /** Evidence validator */ + validator?: tendermint.abci.types.IValidator | null; + + /** Evidence height */ + height?: number | Long | null; + + /** Evidence time */ + time?: google.protobuf.ITimestamp | null; + + /** Evidence totalVotingPower */ + totalVotingPower?: number | Long | null; + } + + /** Represents an Evidence. */ + class Evidence implements IEvidence { + /** + * Constructs a new Evidence. + * @param [p] Properties to set + */ + constructor(p?: tendermint.abci.types.IEvidence); + + /** Evidence type. */ + public type: string; + + /** Evidence validator. */ + public validator?: tendermint.abci.types.IValidator | null; + + /** Evidence height. */ + public height: number | Long; + + /** Evidence time. */ + public time?: google.protobuf.ITimestamp | null; + + /** Evidence totalVotingPower. */ + public totalVotingPower: number | Long; + + /** + * Creates a new Evidence instance using the specified properties. + * @param [properties] Properties to set + * @returns Evidence instance + */ + public static create(properties?: tendermint.abci.types.IEvidence): tendermint.abci.types.Evidence; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. + * @param m Evidence message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.abci.types.IEvidence, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Evidence + * @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): tendermint.abci.types.Evidence; + } + + /** Represents a ABCIApplication */ + class ABCIApplication extends $protobuf.rpc.Service { + /** + * Constructs a new ABCIApplication service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new ABCIApplication service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create( + rpcImpl: $protobuf.RPCImpl, + requestDelimited?: boolean, + responseDelimited?: boolean, + ): ABCIApplication; + + /** + * Calls Echo. + * @param request RequestEcho message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseEcho + */ + public echo( + request: tendermint.abci.types.IRequestEcho, + callback: tendermint.abci.types.ABCIApplication.EchoCallback, + ): void; + + /** + * Calls Echo. + * @param request RequestEcho message or plain object + * @returns Promise + */ + public echo(request: tendermint.abci.types.IRequestEcho): Promise; + + /** + * Calls Flush. + * @param request RequestFlush message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseFlush + */ + public flush( + request: tendermint.abci.types.IRequestFlush, + callback: tendermint.abci.types.ABCIApplication.FlushCallback, + ): void; + + /** + * Calls Flush. + * @param request RequestFlush message or plain object + * @returns Promise + */ + public flush( + request: tendermint.abci.types.IRequestFlush, + ): Promise; + + /** + * Calls Info. + * @param request RequestInfo message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseInfo + */ + public info( + request: tendermint.abci.types.IRequestInfo, + callback: tendermint.abci.types.ABCIApplication.InfoCallback, + ): void; + + /** + * Calls Info. + * @param request RequestInfo message or plain object + * @returns Promise + */ + public info(request: tendermint.abci.types.IRequestInfo): Promise; + + /** + * Calls SetOption. + * @param request RequestSetOption message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseSetOption + */ + public setOption( + request: tendermint.abci.types.IRequestSetOption, + callback: tendermint.abci.types.ABCIApplication.SetOptionCallback, + ): void; + + /** + * Calls SetOption. + * @param request RequestSetOption message or plain object + * @returns Promise + */ + public setOption( + request: tendermint.abci.types.IRequestSetOption, + ): Promise; + + /** + * Calls DeliverTx. + * @param request RequestDeliverTx message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseDeliverTx + */ + public deliverTx( + request: tendermint.abci.types.IRequestDeliverTx, + callback: tendermint.abci.types.ABCIApplication.DeliverTxCallback, + ): void; + + /** + * Calls DeliverTx. + * @param request RequestDeliverTx message or plain object + * @returns Promise + */ + public deliverTx( + request: tendermint.abci.types.IRequestDeliverTx, + ): Promise; + + /** + * Calls CheckTx. + * @param request RequestCheckTx message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseCheckTx + */ + public checkTx( + request: tendermint.abci.types.IRequestCheckTx, + callback: tendermint.abci.types.ABCIApplication.CheckTxCallback, + ): void; + + /** + * Calls CheckTx. + * @param request RequestCheckTx message or plain object + * @returns Promise + */ + public checkTx( + request: tendermint.abci.types.IRequestCheckTx, + ): Promise; + + /** + * Calls Query. + * @param request RequestQuery message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseQuery + */ + public query( + request: tendermint.abci.types.IRequestQuery, + callback: tendermint.abci.types.ABCIApplication.QueryCallback, + ): void; + + /** + * Calls Query. + * @param request RequestQuery message or plain object + * @returns Promise + */ + public query( + request: tendermint.abci.types.IRequestQuery, + ): Promise; + + /** + * Calls Commit. + * @param request RequestCommit message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseCommit + */ + public commit( + request: tendermint.abci.types.IRequestCommit, + callback: tendermint.abci.types.ABCIApplication.CommitCallback, + ): void; + + /** + * Calls Commit. + * @param request RequestCommit message or plain object + * @returns Promise + */ + public commit( + request: tendermint.abci.types.IRequestCommit, + ): Promise; + + /** + * Calls InitChain. + * @param request RequestInitChain message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseInitChain + */ + public initChain( + request: tendermint.abci.types.IRequestInitChain, + callback: tendermint.abci.types.ABCIApplication.InitChainCallback, + ): void; + + /** + * Calls InitChain. + * @param request RequestInitChain message or plain object + * @returns Promise + */ + public initChain( + request: tendermint.abci.types.IRequestInitChain, + ): Promise; + + /** + * Calls BeginBlock. + * @param request RequestBeginBlock message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseBeginBlock + */ + public beginBlock( + request: tendermint.abci.types.IRequestBeginBlock, + callback: tendermint.abci.types.ABCIApplication.BeginBlockCallback, + ): void; + + /** + * Calls BeginBlock. + * @param request RequestBeginBlock message or plain object + * @returns Promise + */ + public beginBlock( + request: tendermint.abci.types.IRequestBeginBlock, + ): Promise; + + /** + * Calls EndBlock. + * @param request RequestEndBlock message or plain object + * @param callback Node-style callback called with the error, if any, and ResponseEndBlock + */ + public endBlock( + request: tendermint.abci.types.IRequestEndBlock, + callback: tendermint.abci.types.ABCIApplication.EndBlockCallback, + ): void; + + /** + * Calls EndBlock. + * @param request RequestEndBlock message or plain object + * @returns Promise + */ + public endBlock( + request: tendermint.abci.types.IRequestEndBlock, + ): Promise; + } + + namespace ABCIApplication { + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#echo}. + * @param error Error, if any + * @param [response] ResponseEcho + */ + type EchoCallback = (error: Error | null, response?: tendermint.abci.types.ResponseEcho) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#flush}. + * @param error Error, if any + * @param [response] ResponseFlush + */ + type FlushCallback = (error: Error | null, response?: tendermint.abci.types.ResponseFlush) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#info}. + * @param error Error, if any + * @param [response] ResponseInfo + */ + type InfoCallback = (error: Error | null, response?: tendermint.abci.types.ResponseInfo) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#setOption}. + * @param error Error, if any + * @param [response] ResponseSetOption + */ + type SetOptionCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseSetOption, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#deliverTx}. + * @param error Error, if any + * @param [response] ResponseDeliverTx + */ + type DeliverTxCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseDeliverTx, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#checkTx}. + * @param error Error, if any + * @param [response] ResponseCheckTx + */ + type CheckTxCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseCheckTx, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#query}. + * @param error Error, if any + * @param [response] ResponseQuery + */ + type QueryCallback = (error: Error | null, response?: tendermint.abci.types.ResponseQuery) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#commit}. + * @param error Error, if any + * @param [response] ResponseCommit + */ + type CommitCallback = (error: Error | null, response?: tendermint.abci.types.ResponseCommit) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#initChain}. + * @param error Error, if any + * @param [response] ResponseInitChain + */ + type InitChainCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseInitChain, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#beginBlock}. + * @param error Error, if any + * @param [response] ResponseBeginBlock + */ + type BeginBlockCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseBeginBlock, + ) => void; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#endBlock}. + * @param error Error, if any + * @param [response] ResponseEndBlock + */ + type EndBlockCallback = ( + error: Error | null, + response?: tendermint.abci.types.ResponseEndBlock, + ) => void; + } + } + } + + /** Namespace crypto. */ + namespace crypto { + /** Namespace merkle. */ + namespace merkle { + /** Properties of a ProofOp. */ + interface IProofOp { + /** ProofOp type */ + type?: string | null; + + /** ProofOp key */ + key?: Uint8Array | null; + + /** ProofOp data */ + data?: Uint8Array | null; + } + + /** Represents a ProofOp. */ + class ProofOp implements IProofOp { + /** + * Constructs a new ProofOp. + * @param [p] Properties to set + */ + constructor(p?: tendermint.crypto.merkle.IProofOp); + + /** ProofOp type. */ + public type: string; + + /** ProofOp key. */ + public key: Uint8Array; + + /** ProofOp data. */ + public data: Uint8Array; + + /** + * Creates a new ProofOp instance using the specified properties. + * @param [properties] Properties to set + * @returns ProofOp instance + */ + public static create( + properties?: tendermint.crypto.merkle.IProofOp, + ): tendermint.crypto.merkle.ProofOp; + + /** + * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. + * @param m ProofOp message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.crypto.merkle.IProofOp, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProofOp message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns ProofOp + * @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): tendermint.crypto.merkle.ProofOp; + } + + /** Properties of a Proof. */ + interface IProof { + /** Proof ops */ + ops?: tendermint.crypto.merkle.IProofOp[] | null; + } + + /** Represents a Proof. */ + class Proof implements IProof { + /** + * Constructs a new Proof. + * @param [p] Properties to set + */ + constructor(p?: tendermint.crypto.merkle.IProof); + + /** Proof ops. */ + public ops: tendermint.crypto.merkle.IProofOp[]; + + /** + * Creates a new Proof instance using the specified properties. + * @param [properties] Properties to set + * @returns Proof instance + */ + public static create(properties?: tendermint.crypto.merkle.IProof): tendermint.crypto.merkle.Proof; + + /** + * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. + * @param m Proof message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.crypto.merkle.IProof, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Proof message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Proof + * @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): tendermint.crypto.merkle.Proof; + } + } + } + + /** Namespace libs. */ + namespace libs { + /** Namespace kv. */ + namespace kv { + /** Properties of a Pair. */ + interface IPair { + /** Pair key */ + key?: Uint8Array | null; + + /** Pair value */ + value?: Uint8Array | null; + } + + /** Represents a Pair. */ + class Pair implements IPair { + /** + * Constructs a new Pair. + * @param [p] Properties to set + */ + constructor(p?: tendermint.libs.kv.IPair); + + /** Pair key. */ + public key: Uint8Array; + + /** Pair value. */ + public value: Uint8Array; + + /** + * Creates a new Pair instance using the specified properties. + * @param [properties] Properties to set + * @returns Pair instance + */ + public static create(properties?: tendermint.libs.kv.IPair): tendermint.libs.kv.Pair; + + /** + * Encodes the specified Pair message. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. + * @param m Pair message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.libs.kv.IPair, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pair message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Pair + * @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): tendermint.libs.kv.Pair; + } + + /** Properties of a KI64Pair. */ + interface IKI64Pair { + /** KI64Pair key */ + key?: Uint8Array | null; + + /** KI64Pair value */ + value?: number | Long | null; + } + + /** Represents a KI64Pair. */ + class KI64Pair implements IKI64Pair { + /** + * Constructs a new KI64Pair. + * @param [p] Properties to set + */ + constructor(p?: tendermint.libs.kv.IKI64Pair); + + /** KI64Pair key. */ + public key: Uint8Array; + + /** KI64Pair value. */ + public value: number | Long; + + /** + * Creates a new KI64Pair instance using the specified properties. + * @param [properties] Properties to set + * @returns KI64Pair instance + */ + public static create(properties?: tendermint.libs.kv.IKI64Pair): tendermint.libs.kv.KI64Pair; + + /** + * Encodes the specified KI64Pair message. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. + * @param m KI64Pair message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: tendermint.libs.kv.IKI64Pair, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KI64Pair message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns KI64Pair + * @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): tendermint.libs.kv.KI64Pair; + } + } + } +} + +/** Namespace google. */ +export namespace google { + /** Namespace protobuf. */ + namespace protobuf { + /** Properties of an Any. */ + interface IAny { + /** Any type_url */ + type_url?: string | null; + + /** Any value */ + value?: Uint8Array | null; + } + + /** Represents an Any. */ + class Any implements IAny { + /** + * Constructs a new Any. + * @param [p] Properties to set + */ + constructor(p?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: Uint8Array; + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param m Any message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: google.protobuf.IAny, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Any + * @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): google.protobuf.Any; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + /** Timestamp seconds */ + seconds?: number | Long | null; + + /** Timestamp nanos */ + nanos?: number | null; + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + /** + * Constructs a new Timestamp. + * @param [p] Properties to set + */ + constructor(p?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: number | Long; + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param m Timestamp message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: google.protobuf.ITimestamp, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Timestamp + * @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): google.protobuf.Timestamp; + } + + /** Properties of a Duration. */ + interface IDuration { + /** Duration seconds */ + seconds?: number | Long | null; + + /** Duration nanos */ + nanos?: number | null; + } + + /** Represents a Duration. */ + class Duration implements IDuration { + /** + * Constructs a new Duration. + * @param [p] Properties to set + */ + constructor(p?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: number | Long; + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param m Duration message or plain object to encode + * @param [w] Writer to encode to + * @returns Writer + */ + public static encode(m: google.protobuf.IDuration, w?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand + * @returns Duration + * @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): google.protobuf.Duration; + } + } +} diff --git a/packages/demo-protobuf/types/registry.d.ts b/packages/demo-protobuf/types/registry.d.ts new file mode 100644 index 00000000..09ca8bba --- /dev/null +++ b/packages/demo-protobuf/types/registry.d.ts @@ -0,0 +1,19 @@ +import protobuf from "protobufjs"; +export interface GeneratedType { + readonly create: (properties?: { [k: string]: any }) => any; + readonly encode: ( + message: + | any + | { + [k: string]: any; + }, + writer?: protobuf.Writer, + ) => protobuf.Writer; + readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => any; +} +export declare class Registry { + private readonly types; + constructor(customTypes?: Iterable<[string, GeneratedType]>); + register(name: string, type: GeneratedType): void; + lookupType(name: string): GeneratedType | undefined; +} diff --git a/packages/demo-protobuf/webpack.web.config.js b/packages/demo-protobuf/webpack.web.config.js new file mode 100644 index 00000000..7373cace --- /dev/null +++ b/packages/demo-protobuf/webpack.web.config.js @@ -0,0 +1,19 @@ +const glob = require("glob"); +const path = require("path"); +const webpack = require("webpack"); + +const target = "web"; +const distdir = path.join(__dirname, "dist", "web"); + +module.exports = [ + { + // bundle used for Karma tests + target: target, + entry: glob.sync("./build/**/*.spec.js"), + output: { + path: distdir, + filename: "tests.js", + }, + plugins: [new webpack.EnvironmentPlugin(["WASMD_ENABLED"])], + }, +]; diff --git a/yarn.lock b/yarn.lock index 901a2270..1b65a92c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -890,6 +890,59 @@ dependencies: "@types/node" ">= 8" +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= + "@types/accepts@*": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575" @@ -1057,6 +1110,11 @@ resolved "https://registry.yarnpkg.com/@types/libsodium-wrappers/-/libsodium-wrappers-0.7.7.tgz#cdb25e85458612ec80f0157c3815fac187d0b6d2" integrity sha512-Li91pVKcLvQJK3ZolwCPo85oxf2gKBCApgnesRxYg4OVYchLXcJB2eivX8S87vfQVv6ZRnyCO1lLDosZGJfpRg== +"@types/long@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" + integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== + "@types/mime@*": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" @@ -1077,6 +1135,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== +"@types/node@^13.7.0": + version "13.13.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.12.tgz#9c72e865380a7dc99999ea0ef20fc9635b503d20" + integrity sha512-zWz/8NEPxoXNT9YyF2osqyA9WjssZukYpgI4UYZpOjcyqwIUqWGkcCionaEb9Ki+FULyPyvNFpg/329Kd2/pbw== + "@types/pako@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/pako/-/pako-1.0.1.tgz#33b237f3c9aff44d0f82fe63acffa4a365ef4a61" @@ -5038,6 +5101,11 @@ log4js@^6.2.1: rfdc "^1.1.4" streamroller "^2.2.4" +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -6186,6 +6254,25 @@ 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== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.1" + "@types/node" "^13.7.0" + long "^4.0.0" + protocols@^1.1.0, protocols@^1.4.0: version "1.4.7" resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32"